using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Windows.Forms;
using C1.Win.C1Input;
using C1.Win.C1TrueDBGrid;
using PCSComMaterials.Inventory.BO;
using PCSComProduction.WorkOrder.BO;
using PCSComUtils.Common;
using PCSComUtils.Common.BO;
using PCSComUtils.PCSExc;
using PCSUtils.Log;
using PCSUtils.Utils;
using CancelEventArgs = System.ComponentModel.CancelEventArgs;

namespace PCSProduction.WorkOrder
{
	/// <summary>
	/// Summary description for SelectWorkOrders.
	/// </summary>
	public class SelectWorkOrders : Form
	{
		private C1TrueDBGrid dgrdData;
		private CheckBox chkSelectAll;
		private Button btnClose;
		private Button btnHelp;
		private Button btnSelect;
		private C1DateEdit dtmToStartDate;
		private C1DateEdit dtmFromStartDate;
		private Label lblToStartDate;
		private Button btnSearch;
		private Label lblCCN;
		private Button btnSearchBeginWO;
		private TextBox txtBeginWO;
		private Label lblMasLoc;
		private Label lblFromStartDate;
		private Label lblWO;
		private Label lblMasLocValue;
		private Label lblCCNValue;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private Container components = null;

		DataTable dtbData = new DataTable();

		private const string THIS = "PCSProduction.WorkOrder.SelectWorkOrders";

		private const string HASBIN = "HasBin";
		
		private const string REMAIN_WO_FOR_ISSUE_VIEW = "v_RemainWOForIssue";		
		private const string REMAIN_COMPONENT_FOR_ISSUE_VIEW = "v_RemainComponentForWOIssueWithParentInfo";

		private DataTable dtStoreGridLayout;
		
		private int mMasterLocationID;
		private string mMasterLocCode;
		private int mCCNID;
		private string mCCNCode;
		private int intWorkOrderMasterID;
		private int intPurpose;

		//define some constant column
		private const string SELECTED_COL = "SELECTED";
		
		#region Properties

		private DateTime mPostDate = DateTime.MinValue;
		private int mToLocationID = 0;
		private int mCurrentLine =0;
		private System.Windows.Forms.TextBox txtFGoodsCode;
		private System.Windows.Forms.Button btnFGoodsCode;
		private System.Windows.Forms.Label lblFGoodsCode;
		private System.Windows.Forms.Label lblProductionLine;
		private System.Windows.Forms.Button btnProductionLine;
		private System.Windows.Forms.TextBox txtProductionLine;

		DataSet mReturnResult;
		
		public DateTime PostDate
		{
			set{mPostDate = value;}
		}

		public DataSet SourceDataSet
		{
			set{mReturnResult = value;}
		}

		public DataSet SelectedResultDataSet
		{
			get{ return mReturnResult;}
		}

		public int CurrentLine
		{
			set{ mCurrentLine = value; }
			get{ return mCurrentLine;}
		}

		public int ToLocationID
		{
			set{ mToLocationID = value;}
			get{ return mToLocationID;}
		}

		public int MasterLocationID 
		{
			set{ mMasterLocationID = value;}
		}

		public string MasterLocationCode 
		{
			set{ mMasterLocCode = value;}
		}

		public int CCNID 
		{
			set{ mCCNID = value;}
		}

		public string CCNCode 
		{
			set{ mCCNCode = value;}
		}

		#endregion Properties

		public SelectWorkOrders()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();
		}
		public SelectWorkOrders(int pintPurpose)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();
			intPurpose = pintPurpose;
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(SelectWorkOrders));
			this.dgrdData = new C1.Win.C1TrueDBGrid.C1TrueDBGrid();
			this.chkSelectAll = new System.Windows.Forms.CheckBox();
			this.btnClose = new System.Windows.Forms.Button();
			this.btnHelp = new System.Windows.Forms.Button();
			this.btnSelect = new System.Windows.Forms.Button();
			this.dtmToStartDate = new C1.Win.C1Input.C1DateEdit();
			this.dtmFromStartDate = new C1.Win.C1Input.C1DateEdit();
			this.lblToStartDate = new System.Windows.Forms.Label();
			this.btnSearch = new System.Windows.Forms.Button();
			this.lblCCN = new System.Windows.Forms.Label();
			this.btnSearchBeginWO = new System.Windows.Forms.Button();
			this.txtBeginWO = new System.Windows.Forms.TextBox();
			this.lblMasLoc = new System.Windows.Forms.Label();
			this.lblFromStartDate = new System.Windows.Forms.Label();
			this.lblWO = new System.Windows.Forms.Label();
			this.lblMasLocValue = new System.Windows.Forms.Label();
			this.lblCCNValue = new System.Windows.Forms.Label();
			this.txtFGoodsCode = new System.Windows.Forms.TextBox();
			this.btnFGoodsCode = new System.Windows.Forms.Button();
			this.lblFGoodsCode = new System.Windows.Forms.Label();
			this.lblProductionLine = new System.Windows.Forms.Label();
			this.btnProductionLine = new System.Windows.Forms.Button();
			this.txtProductionLine = new System.Windows.Forms.TextBox();
			((System.ComponentModel.ISupportInitialize)(this.dgrdData)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.dtmToStartDate)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.dtmFromStartDate)).BeginInit();
			this.SuspendLayout();
			// 
			// dgrdData
			// 
			this.dgrdData.AccessibleDescription = resources.GetString("dgrdData.AccessibleDescription");
			this.dgrdData.AccessibleName = resources.GetString("dgrdData.AccessibleName");
			this.dgrdData.AllowAddNew = ((bool)(resources.GetObject("dgrdData.AllowAddNew")));
			this.dgrdData.AllowArrows = ((bool)(resources.GetObject("dgrdData.AllowArrows")));
			this.dgrdData.AllowColMove = ((bool)(resources.GetObject("dgrdData.AllowColMove")));
			this.dgrdData.AllowColSelect = ((bool)(resources.GetObject("dgrdData.AllowColSelect")));
			this.dgrdData.AllowDelete = ((bool)(resources.GetObject("dgrdData.AllowDelete")));
			this.dgrdData.AllowDrag = ((bool)(resources.GetObject("dgrdData.AllowDrag")));
			this.dgrdData.AllowFilter = ((bool)(resources.GetObject("dgrdData.AllowFilter")));
			this.dgrdData.AllowHorizontalSplit = ((bool)(resources.GetObject("dgrdData.AllowHorizontalSplit")));
			this.dgrdData.AllowRowSelect = ((bool)(resources.GetObject("dgrdData.AllowRowSelect")));
			this.dgrdData.AllowSort = ((bool)(resources.GetObject("dgrdData.AllowSort")));
			this.dgrdData.AllowUpdate = ((bool)(resources.GetObject("dgrdData.AllowUpdate")));
			this.dgrdData.AllowUpdateOnBlur = ((bool)(resources.GetObject("dgrdData.AllowUpdateOnBlur")));
			this.dgrdData.AllowVerticalSplit = ((bool)(resources.GetObject("dgrdData.AllowVerticalSplit")));
			this.dgrdData.AlternatingRows = ((bool)(resources.GetObject("dgrdData.AlternatingRows")));
			this.dgrdData.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("dgrdData.Anchor")));
			this.dgrdData.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dgrdData.BackgroundImage")));
			this.dgrdData.BorderStyle = ((System.Windows.Forms.BorderStyle)(resources.GetObject("dgrdData.BorderStyle")));
			this.dgrdData.Caption = resources.GetString("dgrdData.Caption");
			this.dgrdData.CaptionHeight = ((int)(resources.GetObject("dgrdData.CaptionHeight")));
			this.dgrdData.CellTipsDelay = ((int)(resources.GetObject("dgrdData.CellTipsDelay")));
			this.dgrdData.CellTipsWidth = ((int)(resources.GetObject("dgrdData.CellTipsWidth")));
			this.dgrdData.ChildGrid = ((C1.Win.C1TrueDBGrid.C1TrueDBGrid)(resources.GetObject("dgrdData.ChildGrid")));
			this.dgrdData.CollapseColor = ((System.Drawing.Color)(resources.GetObject("dgrdData.CollapseColor")));
			this.dgrdData.ColumnFooters = ((bool)(resources.GetObject("dgrdData.ColumnFooters")));
			this.dgrdData.ColumnHeaders = ((bool)(resources.GetObject("dgrdData.ColumnHeaders")));
			this.dgrdData.DataView = C1.Win.C1TrueDBGrid.DataViewEnum.GroupBy;
			this.dgrdData.DefColWidth = ((int)(resources.GetObject("dgrdData.DefColWidth")));
			this.dgrdData.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("dgrdData.Dock")));
			this.dgrdData.EditDropDown = ((bool)(resources.GetObject("dgrdData.EditDropDown")));
			this.dgrdData.EmptyRows = ((bool)(resources.GetObject("dgrdData.EmptyRows")));
			this.dgrdData.Enabled = ((bool)(resources.GetObject("dgrdData.Enabled")));
			this.dgrdData.ExpandColor = ((System.Drawing.Color)(resources.GetObject("dgrdData.ExpandColor")));
			this.dgrdData.ExposeCellMode = ((C1.Win.C1TrueDBGrid.ExposeCellModeEnum)(resources.GetObject("dgrdData.ExposeCellMode")));
			this.dgrdData.ExtendRightColumn = ((bool)(resources.GetObject("dgrdData.ExtendRightColumn")));
			this.dgrdData.FetchRowStyles = ((bool)(resources.GetObject("dgrdData.FetchRowStyles")));
			this.dgrdData.FilterBar = ((bool)(resources.GetObject("dgrdData.FilterBar")));
			this.dgrdData.FlatStyle = ((C1.Win.C1TrueDBGrid.FlatModeEnum)(resources.GetObject("dgrdData.FlatStyle")));
			this.dgrdData.Font = ((System.Drawing.Font)(resources.GetObject("dgrdData.Font")));
			this.dgrdData.GroupByAreaVisible = ((bool)(resources.GetObject("dgrdData.GroupByAreaVisible")));
			this.dgrdData.GroupByCaption = resources.GetString("dgrdData.GroupByCaption");
			this.dgrdData.Images.Add(((System.Drawing.Image)(resources.GetObject("resource"))));
			this.dgrdData.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dgrdData.ImeMode")));
			this.dgrdData.LinesPerRow = ((int)(resources.GetObject("dgrdData.LinesPerRow")));
			this.dgrdData.Location = ((System.Drawing.Point)(resources.GetObject("dgrdData.Location")));
			this.dgrdData.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.DottedCellBorder;
			this.dgrdData.MultiSelect = C1.Win.C1TrueDBGrid.MultiSelectEnum.None;
			this.dgrdData.Name = "dgrdData";
			this.dgrdData.PictureAddnewRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureAddnewRow")));
			this.dgrdData.PictureCurrentRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureCurrentRow")));
			this.dgrdData.PictureFilterBar = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureFilterBar")));
			this.dgrdData.PictureFooterRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureFooterRow")));
			this.dgrdData.PictureHeaderRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureHeaderRow")));
			this.dgrdData.PictureModifiedRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureModifiedRow")));
			this.dgrdData.PictureStandardRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureStandardRow")));
			this.dgrdData.PreviewInfo.AllowSizing = ((bool)(resources.GetObject("dgrdData.PreviewInfo.AllowSizing")));
			this.dgrdData.PreviewInfo.Caption = resources.GetString("dgrdData.PreviewInfo.Caption");
			this.dgrdData.PreviewInfo.Location = ((System.Drawing.Point)(resources.GetObject("dgrdData.PreviewInfo.Location")));
			this.dgrdData.PreviewInfo.Size = ((System.Drawing.Size)(resources.GetObject("dgrdData.PreviewInfo.Size")));
			this.dgrdData.PreviewInfo.ToolBars = ((bool)(resources.GetObject("dgrdData.PreviewInfo.ToolBars")));
			this.dgrdData.PreviewInfo.UIStrings.Content = ((string[])(resources.GetObject("dgrdData.PreviewInfo.UIStrings.Content")));
			this.dgrdData.PreviewInfo.ZoomFactor = ((System.Double)(resources.GetObject("dgrdData.PreviewInfo.ZoomFactor")));
			this.dgrdData.PrintInfo.MaxRowHeight = ((int)(resources.GetObject("dgrdData.PrintInfo.MaxRowHeight")));
			this.dgrdData.PrintInfo.OwnerDrawPageFooter = ((bool)(resources.GetObject("dgrdData.PrintInfo.OwnerDrawPageFooter")));
			this.dgrdData.PrintInfo.OwnerDrawPageHeader = ((bool)(resources.GetObject("dgrdData.PrintInfo.OwnerDrawPageHeader")));
			this.dgrdData.PrintInfo.PageFooter = resources.GetString("dgrdData.PrintInfo.PageFooter");
			this.dgrdData.PrintInfo.PageFooterHeight = ((int)(resources.GetObject("dgrdData.PrintInfo.PageFooterHeight")));
			this.dgrdData.PrintInfo.PageHeader = resources.GetString("dgrdData.PrintInfo.PageHeader");
			this.dgrdData.PrintInfo.PageHeaderHeight = ((int)(resources.GetObject("dgrdData.PrintInfo.PageHeaderHeight")));
			this.dgrdData.PrintInfo.PrintHorizontalSplits = ((bool)(resources.GetObject("dgrdData.PrintInfo.PrintHorizontalSplits")));
			this.dgrdData.PrintInfo.ProgressCaption = resources.GetString("dgrdData.PrintInfo.ProgressCaption");
			this.dgrdData.PrintInfo.RepeatColumnFooters = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatColumnFooters")));
			this.dgrdData.PrintInfo.RepeatColumnHeaders = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatColumnHeaders")));
			this.dgrdData.PrintInfo.RepeatGridHeader = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatGridHeader")));
			this.dgrdData.PrintInfo.RepeatSplitHeaders = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatSplitHeaders")));
			this.dgrdData.PrintInfo.ShowOptionsDialog = ((bool)(resources.GetObject("dgrdData.PrintInfo.ShowOptionsDialog")));
			this.dgrdData.PrintInfo.ShowProgressForm = ((bool)(resources.GetObject("dgrdData.PrintInfo.ShowProgressForm")));
			this.dgrdData.PrintInfo.ShowSelection = ((bool)(resources.GetObject("dgrdData.PrintInfo.ShowSelection")));
			this.dgrdData.PrintInfo.UseGridColors = ((bool)(resources.GetObject("dgrdData.PrintInfo.UseGridColors")));
			this.dgrdData.RecordSelectors = ((bool)(resources.GetObject("dgrdData.RecordSelectors")));
			this.dgrdData.RecordSelectorWidth = ((int)(resources.GetObject("dgrdData.RecordSelectorWidth")));
			this.dgrdData.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dgrdData.RightToLeft")));
			this.dgrdData.RowDivider.Color = ((System.Drawing.Color)(resources.GetObject("resource.Color")));
			this.dgrdData.RowDivider.Style = ((C1.Win.C1TrueDBGrid.LineStyleEnum)(resources.GetObject("resource.Style")));
			this.dgrdData.RowHeight = ((int)(resources.GetObject("dgrdData.RowHeight")));
			this.dgrdData.RowSubDividerColor = ((System.Drawing.Color)(resources.GetObject("dgrdData.RowSubDividerColor")));
			this.dgrdData.ScrollTips = ((bool)(resources.GetObject("dgrdData.ScrollTips")));
			this.dgrdData.ScrollTrack = ((bool)(resources.GetObject("dgrdData.ScrollTrack")));
			this.dgrdData.Size = ((System.Drawing.Size)(resources.GetObject("dgrdData.Size")));
			this.dgrdData.SpringMode = ((bool)(resources.GetObject("dgrdData.SpringMode")));
			this.dgrdData.TabAcrossSplits = ((bool)(resources.GetObject("dgrdData.TabAcrossSplits")));
			this.dgrdData.TabIndex = ((int)(resources.GetObject("dgrdData.TabIndex")));
			this.dgrdData.Text = resources.GetString("dgrdData.Text");
			this.dgrdData.ViewCaptionWidth = ((int)(resources.GetObject("dgrdData.ViewCaptionWidth")));
			this.dgrdData.ViewColumnWidth = ((int)(resources.GetObject("dgrdData.ViewColumnWidth")));
			this.dgrdData.Visible = ((bool)(resources.GetObject("dgrdData.Visible")));
			this.dgrdData.WrapCellPointer = ((bool)(resources.GetObject("dgrdData.WrapCellPointer")));
			this.dgrdData.AfterColUpdate += new C1.Win.C1TrueDBGrid.ColEventHandler(this.dgrdData_AfterColUpdate);
			this.dgrdData.PropBag = resources.GetString("dgrdData.PropBag");
			// 
			// chkSelectAll
			// 
			this.chkSelectAll.AccessibleDescription = resources.GetString("chkSelectAll.AccessibleDescription");
			this.chkSelectAll.AccessibleName = resources.GetString("chkSelectAll.AccessibleName");
			this.chkSelectAll.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("chkSelectAll.Anchor")));
			this.chkSelectAll.Appearance = ((System.Windows.Forms.Appearance)(resources.GetObject("chkSelectAll.Appearance")));
			this.chkSelectAll.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkSelectAll.BackgroundImage")));
			this.chkSelectAll.CheckAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkSelectAll.CheckAlign")));
			this.chkSelectAll.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("chkSelectAll.Dock")));
			this.chkSelectAll.Enabled = ((bool)(resources.GetObject("chkSelectAll.Enabled")));
			this.chkSelectAll.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("chkSelectAll.FlatStyle")));
			this.chkSelectAll.Font = ((System.Drawing.Font)(resources.GetObject("chkSelectAll.Font")));
			this.chkSelectAll.Image = ((System.Drawing.Image)(resources.GetObject("chkSelectAll.Image")));
			this.chkSelectAll.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkSelectAll.ImageAlign")));
			this.chkSelectAll.ImageIndex = ((int)(resources.GetObject("chkSelectAll.ImageIndex")));
			this.chkSelectAll.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("chkSelectAll.ImeMode")));
			this.chkSelectAll.Location = ((System.Drawing.Point)(resources.GetObject("chkSelectAll.Location")));
			this.chkSelectAll.Name = "chkSelectAll";
			this.chkSelectAll.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("chkSelectAll.RightToLeft")));
			this.chkSelectAll.Size = ((System.Drawing.Size)(resources.GetObject("chkSelectAll.Size")));
			this.chkSelectAll.TabIndex = ((int)(resources.GetObject("chkSelectAll.TabIndex")));
			this.chkSelectAll.Text = resources.GetString("chkSelectAll.Text");
			this.chkSelectAll.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkSelectAll.TextAlign")));
			this.chkSelectAll.Visible = ((bool)(resources.GetObject("chkSelectAll.Visible")));
			this.chkSelectAll.Click += new System.EventHandler(this.chkSelectAll_Click);
			// 
			// btnClose
			// 
			this.btnClose.AccessibleDescription = resources.GetString("btnClose.AccessibleDescription");
			this.btnClose.AccessibleName = resources.GetString("btnClose.AccessibleName");
			this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnClose.Anchor")));
			this.btnClose.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnClose.BackgroundImage")));
			this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.btnClose.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnClose.Dock")));
			this.btnClose.Enabled = ((bool)(resources.GetObject("btnClose.Enabled")));
			this.btnClose.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnClose.FlatStyle")));
			this.btnClose.Font = ((System.Drawing.Font)(resources.GetObject("btnClose.Font")));
			this.btnClose.Image = ((System.Drawing.Image)(resources.GetObject("btnClose.Image")));
			this.btnClose.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnClose.ImageAlign")));
			this.btnClose.ImageIndex = ((int)(resources.GetObject("btnClose.ImageIndex")));
			this.btnClose.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnClose.ImeMode")));
			this.btnClose.Location = ((System.Drawing.Point)(resources.GetObject("btnClose.Location")));
			this.btnClose.Name = "btnClose";
			this.btnClose.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnClose.RightToLeft")));
			this.btnClose.Size = ((System.Drawing.Size)(resources.GetObject("btnClose.Size")));
			this.btnClose.TabIndex = ((int)(resources.GetObject("btnClose.TabIndex")));
			this.btnClose.Text = resources.GetString("btnClose.Text");
			this.btnClose.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnClose.TextAlign")));
			this.btnClose.Visible = ((bool)(resources.GetObject("btnClose.Visible")));
			this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
			// 
			// btnHelp
			// 
			this.btnHelp.AccessibleDescription = resources.GetString("btnHelp.AccessibleDescription");
			this.btnHelp.AccessibleName = resources.GetString("btnHelp.AccessibleName");
			this.btnHelp.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnHelp.Anchor")));
			this.btnHelp.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnHelp.BackgroundImage")));
			this.btnHelp.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnHelp.Dock")));
			this.btnHelp.Enabled = ((bool)(resources.GetObject("btnHelp.Enabled")));
			this.btnHelp.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnHelp.FlatStyle")));
			this.btnHelp.Font = ((System.Drawing.Font)(resources.GetObject("btnHelp.Font")));
			this.btnHelp.Image = ((System.Drawing.Image)(resources.GetObject("btnHelp.Image")));
			this.btnHelp.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnHelp.ImageAlign")));
			this.btnHelp.ImageIndex = ((int)(resources.GetObject("btnHelp.ImageIndex")));
			this.btnHelp.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnHelp.ImeMode")));
			this.btnHelp.Location = ((System.Drawing.Point)(resources.GetObject("btnHelp.Location")));
			this.btnHelp.Name = "btnHelp";
			this.btnHelp.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnHelp.RightToLeft")));
			this.btnHelp.Size = ((System.Drawing.Size)(resources.GetObject("btnHelp.Size")));
			this.btnHelp.TabIndex = ((int)(resources.GetObject("btnHelp.TabIndex")));
			this.btnHelp.Text = resources.GetString("btnHelp.Text");
			this.btnHelp.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnHelp.TextAlign")));
			this.btnHelp.Visible = ((bool)(resources.GetObject("btnHelp.Visible")));
			// 
			// btnSelect
			// 
			this.btnSelect.AccessibleDescription = resources.GetString("btnSelect.AccessibleDescription");
			this.btnSelect.AccessibleName = resources.GetString("btnSelect.AccessibleName");
			this.btnSelect.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnSelect.Anchor")));
			this.btnSelect.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSelect.BackgroundImage")));
			this.btnSelect.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnSelect.Dock")));
			this.btnSelect.Enabled = ((bool)(resources.GetObject("btnSelect.Enabled")));
			this.btnSelect.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnSelect.FlatStyle")));
			this.btnSelect.Font = ((System.Drawing.Font)(resources.GetObject("btnSelect.Font")));
			this.btnSelect.Image = ((System.Drawing.Image)(resources.GetObject("btnSelect.Image")));
			this.btnSelect.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSelect.ImageAlign")));
			this.btnSelect.ImageIndex = ((int)(resources.GetObject("btnSelect.ImageIndex")));
			this.btnSelect.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnSelect.ImeMode")));
			this.btnSelect.Location = ((System.Drawing.Point)(resources.GetObject("btnSelect.Location")));
			this.btnSelect.Name = "btnSelect";
			this.btnSelect.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnSelect.RightToLeft")));
			this.btnSelect.Size = ((System.Drawing.Size)(resources.GetObject("btnSelect.Size")));
			this.btnSelect.TabIndex = ((int)(resources.GetObject("btnSelect.TabIndex")));
			this.btnSelect.Text = resources.GetString("btnSelect.Text");
			this.btnSelect.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSelect.TextAlign")));
			this.btnSelect.Visible = ((bool)(resources.GetObject("btnSelect.Visible")));
			this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click);
			// 
			// dtmToStartDate
			// 
			this.dtmToStartDate.AcceptsEscape = ((bool)(resources.GetObject("dtmToStartDate.AcceptsEscape")));
			this.dtmToStartDate.AccessibleDescription = resources.GetString("dtmToStartDate.AccessibleDescription");
			this.dtmToStartDate.AccessibleName = resources.GetString("dtmToStartDate.AccessibleName");
			this.dtmToStartDate.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("dtmToStartDate.Anchor")));
			this.dtmToStartDate.AutoSize = ((bool)(resources.GetObject("dtmToStartDate.AutoSize")));
			this.dtmToStartDate.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dtmToStartDate.BackgroundImage")));
			this.dtmToStartDate.BorderStyle = ((System.Windows.Forms.BorderStyle)(resources.GetObject("dtmToStartDate.BorderStyle")));
			// 
			// dtmToStartDate.Calendar
			// 
			this.dtmToStartDate.Calendar.AccessibleDescription = resources.GetString("dtmToStartDate.Calendar.AccessibleDescription");
			this.dtmToStartDate.Calendar.AccessibleName = resources.GetString("dtmToStartDate.Calendar.AccessibleName");
			this.dtmToStartDate.Calendar.AnnuallyBoldedDates = ((System.DateTime[])(resources.GetObject("dtmToStartDate.Calendar.AnnuallyBoldedDates")));
			this.dtmToStartDate.Calendar.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dtmToStartDate.Calendar.BackgroundImage")));
			this.dtmToStartDate.Calendar.BoldedDates = ((System.DateTime[])(resources.GetObject("dtmToStartDate.Calendar.BoldedDates")));
			this.dtmToStartDate.Calendar.CalendarDimensions = ((System.Drawing.Size)(resources.GetObject("dtmToStartDate.Calendar.CalendarDimensions")));
			this.dtmToStartDate.Calendar.Enabled = ((bool)(resources.GetObject("dtmToStartDate.Calendar.Enabled")));
			this.dtmToStartDate.Calendar.FirstDayOfWeek = ((System.Windows.Forms.Day)(resources.GetObject("dtmToStartDate.Calendar.FirstDayOfWeek")));
			this.dtmToStartDate.Calendar.Font = ((System.Drawing.Font)(resources.GetObject("dtmToStartDate.Calendar.Font")));
			this.dtmToStartDate.Calendar.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dtmToStartDate.Calendar.ImeMode")));
			this.dtmToStartDate.Calendar.MonthlyBoldedDates = ((System.DateTime[])(resources.GetObject("dtmToStartDate.Calendar.MonthlyBoldedDates")));
			this.dtmToStartDate.Calendar.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dtmToStartDate.Calendar.RightToLeft")));
			this.dtmToStartDate.Calendar.ShowClearButton = ((bool)(resources.GetObject("dtmToStartDate.Calendar.ShowClearButton")));
			this.dtmToStartDate.Calendar.ShowTodayButton = ((bool)(resources.GetObject("dtmToStartDate.Calendar.ShowTodayButton")));
			this.dtmToStartDate.Calendar.ShowWeekNumbers = ((bool)(resources.GetObject("dtmToStartDate.Calendar.ShowWeekNumbers")));
			this.dtmToStartDate.CaseSensitive = ((bool)(resources.GetObject("dtmToStartDate.CaseSensitive")));
			this.dtmToStartDate.Culture = ((int)(resources.GetObject("dtmToStartDate.Culture")));
			this.dtmToStartDate.CurrentTimeZone = ((bool)(resources.GetObject("dtmToStartDate.CurrentTimeZone")));
			this.dtmToStartDate.CustomFormat = resources.GetString("dtmToStartDate.CustomFormat");
			this.dtmToStartDate.DaylightTimeAdjustment = ((C1.Win.C1Input.DaylightTimeAdjustmentEnum)(resources.GetObject("dtmToStartDate.DaylightTimeAdjustment")));
			this.dtmToStartDate.DisplayFormat.CustomFormat = resources.GetString("dtmToStartDate.DisplayFormat.CustomFormat");
			this.dtmToStartDate.DisplayFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmToStartDate.DisplayFormat.FormatType")));
			this.dtmToStartDate.DisplayFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("dtmToStartDate.DisplayFormat.Inherit")));
			this.dtmToStartDate.DisplayFormat.NullText = resources.GetString("dtmToStartDate.DisplayFormat.NullText");
			this.dtmToStartDate.DisplayFormat.TrimEnd = ((bool)(resources.GetObject("dtmToStartDate.DisplayFormat.TrimEnd")));
			this.dtmToStartDate.DisplayFormat.TrimStart = ((bool)(resources.GetObject("dtmToStartDate.DisplayFormat.TrimStart")));
			this.dtmToStartDate.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("dtmToStartDate.Dock")));
			this.dtmToStartDate.DropDownFormAlign = ((C1.Win.C1Input.DropDownFormAlignmentEnum)(resources.GetObject("dtmToStartDate.DropDownFormAlign")));
			this.dtmToStartDate.EditFormat.CustomFormat = resources.GetString("dtmToStartDate.EditFormat.CustomFormat");
			this.dtmToStartDate.EditFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmToStartDate.EditFormat.FormatType")));
			this.dtmToStartDate.EditFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("dtmToStartDate.EditFormat.Inherit")));
			this.dtmToStartDate.EditFormat.NullText = resources.GetString("dtmToStartDate.EditFormat.NullText");
			this.dtmToStartDate.EditFormat.TrimEnd = ((bool)(resources.GetObject("dtmToStartDate.EditFormat.TrimEnd")));
			this.dtmToStartDate.EditFormat.TrimStart = ((bool)(resources.GetObject("dtmToStartDate.EditFormat.TrimStart")));
			this.dtmToStartDate.EditMask = resources.GetString("dtmToStartDate.EditMask");
			this.dtmToStartDate.EmptyAsNull = ((bool)(resources.GetObject("dtmToStartDate.EmptyAsNull")));
			this.dtmToStartDate.Enabled = ((bool)(resources.GetObject("dtmToStartDate.Enabled")));
			this.dtmToStartDate.ErrorInfo.BeepOnError = ((bool)(resources.GetObject("dtmToStartDate.ErrorInfo.BeepOnError")));
			this.dtmToStartDate.ErrorInfo.ErrorMessage = resources.GetString("dtmToStartDate.ErrorInfo.ErrorMessage");
			this.dtmToStartDate.ErrorInfo.ErrorMessageCaption = resources.GetString("dtmToStartDate.ErrorInfo.ErrorMessageCaption");
			this.dtmToStartDate.ErrorInfo.ShowErrorMessage = ((bool)(resources.GetObject("dtmToStartDate.ErrorInfo.ShowErrorMessage")));
			this.dtmToStartDate.ErrorInfo.ValueOnError = ((object)(resources.GetObject("dtmToStartDate.ErrorInfo.ValueOnError")));
			this.dtmToStartDate.Font = ((System.Drawing.Font)(resources.GetObject("dtmToStartDate.Font")));
			this.dtmToStartDate.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmToStartDate.FormatType")));
			this.dtmToStartDate.GapHeight = ((int)(resources.GetObject("dtmToStartDate.GapHeight")));
			this.dtmToStartDate.GMTOffset = ((System.TimeSpan)(resources.GetObject("dtmToStartDate.GMTOffset")));
			this.dtmToStartDate.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dtmToStartDate.ImeMode")));
			this.dtmToStartDate.InitialSelection = ((C1.Win.C1Input.InitialSelectionEnum)(resources.GetObject("dtmToStartDate.InitialSelection")));
			this.dtmToStartDate.Location = ((System.Drawing.Point)(resources.GetObject("dtmToStartDate.Location")));
			this.dtmToStartDate.MaskInfo.AutoTabWhenFilled = ((bool)(resources.GetObject("dtmToStartDate.MaskInfo.AutoTabWhenFilled")));
			this.dtmToStartDate.MaskInfo.CaseSensitive = ((bool)(resources.GetObject("dtmToStartDate.MaskInfo.CaseSensitive")));
			this.dtmToStartDate.MaskInfo.CopyWithLiterals = ((bool)(resources.GetObject("dtmToStartDate.MaskInfo.CopyWithLiterals")));
			this.dtmToStartDate.MaskInfo.EditMask = resources.GetString("dtmToStartDate.MaskInfo.EditMask");
			this.dtmToStartDate.MaskInfo.EmptyAsNull = ((bool)(resources.GetObject("dtmToStartDate.MaskInfo.EmptyAsNull")));
			this.dtmToStartDate.MaskInfo.ErrorMessage = resources.GetString("dtmToStartDate.MaskInfo.ErrorMessage");
			this.dtmToStartDate.MaskInfo.Inherit = ((C1.Win.C1Input.MaskInfoInheritFlags)(resources.GetObject("dtmToStartDate.MaskInfo.Inherit")));
			this.dtmToStartDate.MaskInfo.PromptChar = ((char)(resources.GetObject("dtmToStartDate.MaskInfo.PromptChar")));
			this.dtmToStartDate.MaskInfo.ShowLiterals = ((C1.Win.C1Input.ShowLiteralsEnum)(resources.GetObject("dtmToStartDate.MaskInfo.ShowLiterals")));
			this.dtmToStartDate.MaskInfo.StoredEmptyChar = ((char)(resources.GetObject("dtmToStartDate.MaskInfo.StoredEmptyChar")));
			this.dtmToStartDate.MaxLength = ((int)(resources.GetObject("dtmToStartDate.MaxLength")));
			this.dtmToStartDate.Name = "dtmToStartDate";
			this.dtmToStartDate.NullText = resources.GetString("dtmToStartDate.NullText");
			this.dtmToStartDate.ParseInfo.CaseSensitive = ((bool)(resources.GetObject("dtmToStartDate.ParseInfo.CaseSensitive")));
			this.dtmToStartDate.ParseInfo.CustomFormat = resources.GetString("dtmToStartDate.ParseInfo.CustomFormat");
			this.dtmToStartDate.ParseInfo.DateTimeStyle = ((C1.Win.C1Input.DateTimeStyleFlags)(resources.GetObject("dtmToStartDate.ParseInfo.DateTimeStyle")));
			this.dtmToStartDate.ParseInfo.EmptyAsNull = ((bool)(resources.GetObject("dtmToStartDate.ParseInfo.EmptyAsNull")));
			this.dtmToStartDate.ParseInfo.ErrorMessage = resources.GetString("dtmToStartDate.ParseInfo.ErrorMessage");
			this.dtmToStartDate.ParseInfo.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmToStartDate.ParseInfo.FormatType")));
			this.dtmToStartDate.ParseInfo.Inherit = ((C1.Win.C1Input.ParseInfoInheritFlags)(resources.GetObject("dtmToStartDate.ParseInfo.Inherit")));
			this.dtmToStartDate.ParseInfo.NullText = resources.GetString("dtmToStartDate.ParseInfo.NullText");
			this.dtmToStartDate.ParseInfo.TrimEnd = ((bool)(resources.GetObject("dtmToStartDate.ParseInfo.TrimEnd")));
			this.dtmToStartDate.ParseInfo.TrimStart = ((bool)(resources.GetObject("dtmToStartDate.ParseInfo.TrimStart")));
			this.dtmToStartDate.PasswordChar = ((char)(resources.GetObject("dtmToStartDate.PasswordChar")));
			this.dtmToStartDate.PostValidation.CaseSensitive = ((bool)(resources.GetObject("dtmToStartDate.PostValidation.CaseSensitive")));
			this.dtmToStartDate.PostValidation.ErrorMessage = resources.GetString("dtmToStartDate.PostValidation.ErrorMessage");
			this.dtmToStartDate.PostValidation.Inherit = ((C1.Win.C1Input.PostValidationInheritFlags)(resources.GetObject("dtmToStartDate.PostValidation.Inherit")));
			this.dtmToStartDate.PostValidation.Validation = ((C1.Win.C1Input.PostValidationTypeEnum)(resources.GetObject("dtmToStartDate.PostValidation.Validation")));
			this.dtmToStartDate.PostValidation.Values = ((System.Array)(resources.GetObject("dtmToStartDate.PostValidation.Values")));
			this.dtmToStartDate.PostValidation.ValuesExcluded = ((System.Array)(resources.GetObject("dtmToStartDate.PostValidation.ValuesExcluded")));
			this.dtmToStartDate.PreValidation.CaseSensitive = ((bool)(resources.GetObject("dtmToStartDate.PreValidation.CaseSensitive")));
			this.dtmToStartDate.PreValidation.ErrorMessage = resources.GetString("dtmToStartDate.PreValidation.ErrorMessage");
			this.dtmToStartDate.PreValidation.Inherit = ((C1.Win.C1Input.PreValidationInheritFlags)(resources.GetObject("dtmToStartDate.PreValidation.Inherit")));
			this.dtmToStartDate.PreValidation.ItemSeparator = resources.GetString("dtmToStartDate.PreValidation.ItemSeparator");
			this.dtmToStartDate.PreValidation.PatternString = resources.GetString("dtmToStartDate.PreValidation.PatternString");
			this.dtmToStartDate.PreValidation.RegexOptions = ((C1.Win.C1Input.RegexOptionFlags)(resources.GetObject("dtmToStartDate.PreValidation.RegexOptions")));
			this.dtmToStartDate.PreValidation.TrimEnd = ((bool)(resources.GetObject("dtmToStartDate.PreValidation.TrimEnd")));
			this.dtmToStartDate.PreValidation.TrimStart = ((bool)(resources.GetObject("dtmToStartDate.PreValidation.TrimStart")));
			this.dtmToStartDate.PreValidation.Validation = ((C1.Win.C1Input.PreValidationTypeEnum)(resources.GetObject("dtmToStartDate.PreValidation.Validation")));
			this.dtmToStartDate.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dtmToStartDate.RightToLeft")));
			this.dtmToStartDate.ShowFocusRectangle = ((bool)(resources.GetObject("dtmToStartDate.ShowFocusRectangle")));
			this.dtmToStartDate.Size = ((System.Drawing.Size)(resources.GetObject("dtmToStartDate.Size")));
			this.dtmToStartDate.TabIndex = ((int)(resources.GetObject("dtmToStartDate.TabIndex")));
			this.dtmToStartDate.Tag = ((object)(resources.GetObject("dtmToStartDate.Tag")));
			this.dtmToStartDate.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("dtmToStartDate.TextAlign")));
			this.dtmToStartDate.TrimEnd = ((bool)(resources.GetObject("dtmToStartDate.TrimEnd")));
			this.dtmToStartDate.TrimStart = ((bool)(resources.GetObject("dtmToStartDate.TrimStart")));
			this.dtmToStartDate.UserCultureOverride = ((bool)(resources.GetObject("dtmToStartDate.UserCultureOverride")));
			this.dtmToStartDate.Value = ((object)(resources.GetObject("dtmToStartDate.Value")));
			this.dtmToStartDate.VerticalAlign = ((C1.Win.C1Input.VerticalAlignEnum)(resources.GetObject("dtmToStartDate.VerticalAlign")));
			this.dtmToStartDate.Visible = ((bool)(resources.GetObject("dtmToStartDate.Visible")));
			this.dtmToStartDate.VisibleButtons = ((C1.Win.C1Input.DropDownControlButtonFlags)(resources.GetObject("dtmToStartDate.VisibleButtons")));
			this.dtmToStartDate.WrapDateTimeFields = false;
			// 
			// dtmFromStartDate
			// 
			this.dtmFromStartDate.AcceptsEscape = ((bool)(resources.GetObject("dtmFromStartDate.AcceptsEscape")));
			this.dtmFromStartDate.AccessibleDescription = resources.GetString("dtmFromStartDate.AccessibleDescription");
			this.dtmFromStartDate.AccessibleName = resources.GetString("dtmFromStartDate.AccessibleName");
			this.dtmFromStartDate.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("dtmFromStartDate.Anchor")));
			this.dtmFromStartDate.AutoSize = ((bool)(resources.GetObject("dtmFromStartDate.AutoSize")));
			this.dtmFromStartDate.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dtmFromStartDate.BackgroundImage")));
			this.dtmFromStartDate.BorderStyle = ((System.Windows.Forms.BorderStyle)(resources.GetObject("dtmFromStartDate.BorderStyle")));
			// 
			// dtmFromStartDate.Calendar
			// 
			this.dtmFromStartDate.Calendar.AccessibleDescription = resources.GetString("dtmFromStartDate.Calendar.AccessibleDescription");
			this.dtmFromStartDate.Calendar.AccessibleName = resources.GetString("dtmFromStartDate.Calendar.AccessibleName");
			this.dtmFromStartDate.Calendar.AnnuallyBoldedDates = ((System.DateTime[])(resources.GetObject("dtmFromStartDate.Calendar.AnnuallyBoldedDates")));
			this.dtmFromStartDate.Calendar.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dtmFromStartDate.Calendar.BackgroundImage")));
			this.dtmFromStartDate.Calendar.BoldedDates = ((System.DateTime[])(resources.GetObject("dtmFromStartDate.Calendar.BoldedDates")));
			this.dtmFromStartDate.Calendar.CalendarDimensions = ((System.Drawing.Size)(resources.GetObject("dtmFromStartDate.Calendar.CalendarDimensions")));
			this.dtmFromStartDate.Calendar.Enabled = ((bool)(resources.GetObject("dtmFromStartDate.Calendar.Enabled")));
			this.dtmFromStartDate.Calendar.FirstDayOfWeek = ((System.Windows.Forms.Day)(resources.GetObject("dtmFromStartDate.Calendar.FirstDayOfWeek")));
			this.dtmFromStartDate.Calendar.Font = ((System.Drawing.Font)(resources.GetObject("dtmFromStartDate.Calendar.Font")));
			this.dtmFromStartDate.Calendar.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dtmFromStartDate.Calendar.ImeMode")));
			this.dtmFromStartDate.Calendar.MonthlyBoldedDates = ((System.DateTime[])(resources.GetObject("dtmFromStartDate.Calendar.MonthlyBoldedDates")));
			this.dtmFromStartDate.Calendar.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dtmFromStartDate.Calendar.RightToLeft")));
			this.dtmFromStartDate.Calendar.ShowClearButton = ((bool)(resources.GetObject("dtmFromStartDate.Calendar.ShowClearButton")));
			this.dtmFromStartDate.Calendar.ShowTodayButton = ((bool)(resources.GetObject("dtmFromStartDate.Calendar.ShowTodayButton")));
			this.dtmFromStartDate.Calendar.ShowWeekNumbers = ((bool)(resources.GetObject("dtmFromStartDate.Calendar.ShowWeekNumbers")));
			this.dtmFromStartDate.CaseSensitive = ((bool)(resources.GetObject("dtmFromStartDate.CaseSensitive")));
			this.dtmFromStartDate.Culture = ((int)(resources.GetObject("dtmFromStartDate.Culture")));
			this.dtmFromStartDate.CurrentTimeZone = ((bool)(resources.GetObject("dtmFromStartDate.CurrentTimeZone")));
			this.dtmFromStartDate.CustomFormat = resources.GetString("dtmFromStartDate.CustomFormat");
			this.dtmFromStartDate.DaylightTimeAdjustment = ((C1.Win.C1Input.DaylightTimeAdjustmentEnum)(resources.GetObject("dtmFromStartDate.DaylightTimeAdjustment")));
			this.dtmFromStartDate.DisplayFormat.CustomFormat = resources.GetString("dtmFromStartDate.DisplayFormat.CustomFormat");
			this.dtmFromStartDate.DisplayFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmFromStartDate.DisplayFormat.FormatType")));
			this.dtmFromStartDate.DisplayFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("dtmFromStartDate.DisplayFormat.Inherit")));
			this.dtmFromStartDate.DisplayFormat.NullText = resources.GetString("dtmFromStartDate.DisplayFormat.NullText");
			this.dtmFromStartDate.DisplayFormat.TrimEnd = ((bool)(resources.GetObject("dtmFromStartDate.DisplayFormat.TrimEnd")));
			this.dtmFromStartDate.DisplayFormat.TrimStart = ((bool)(resources.GetObject("dtmFromStartDate.DisplayFormat.TrimStart")));
			this.dtmFromStartDate.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("dtmFromStartDate.Dock")));
			this.dtmFromStartDate.DropDownFormAlign = ((C1.Win.C1Input.DropDownFormAlignmentEnum)(resources.GetObject("dtmFromStartDate.DropDownFormAlign")));
			this.dtmFromStartDate.EditFormat.CustomFormat = resources.GetString("dtmFromStartDate.EditFormat.CustomFormat");
			this.dtmFromStartDate.EditFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmFromStartDate.EditFormat.FormatType")));
			this.dtmFromStartDate.EditFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("dtmFromStartDate.EditFormat.Inherit")));
			this.dtmFromStartDate.EditFormat.NullText = resources.GetString("dtmFromStartDate.EditFormat.NullText");
			this.dtmFromStartDate.EditFormat.TrimEnd = ((bool)(resources.GetObject("dtmFromStartDate.EditFormat.TrimEnd")));
			this.dtmFromStartDate.EditFormat.TrimStart = ((bool)(resources.GetObject("dtmFromStartDate.EditFormat.TrimStart")));
			this.dtmFromStartDate.EditMask = resources.GetString("dtmFromStartDate.EditMask");
			this.dtmFromStartDate.EmptyAsNull = ((bool)(resources.GetObject("dtmFromStartDate.EmptyAsNull")));
			this.dtmFromStartDate.Enabled = ((bool)(resources.GetObject("dtmFromStartDate.Enabled")));
			this.dtmFromStartDate.ErrorInfo.BeepOnError = ((bool)(resources.GetObject("dtmFromStartDate.ErrorInfo.BeepOnError")));
			this.dtmFromStartDate.ErrorInfo.ErrorMessage = resources.GetString("dtmFromStartDate.ErrorInfo.ErrorMessage");
			this.dtmFromStartDate.ErrorInfo.ErrorMessageCaption = resources.GetString("dtmFromStartDate.ErrorInfo.ErrorMessageCaption");
			this.dtmFromStartDate.ErrorInfo.ShowErrorMessage = ((bool)(resources.GetObject("dtmFromStartDate.ErrorInfo.ShowErrorMessage")));
			this.dtmFromStartDate.ErrorInfo.ValueOnError = ((object)(resources.GetObject("dtmFromStartDate.ErrorInfo.ValueOnError")));
			this.dtmFromStartDate.Font = ((System.Drawing.Font)(resources.GetObject("dtmFromStartDate.Font")));
			this.dtmFromStartDate.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmFromStartDate.FormatType")));
			this.dtmFromStartDate.GapHeight = ((int)(resources.GetObject("dtmFromStartDate.GapHeight")));
			this.dtmFromStartDate.GMTOffset = ((System.TimeSpan)(resources.GetObject("dtmFromStartDate.GMTOffset")));
			this.dtmFromStartDate.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dtmFromStartDate.ImeMode")));
			this.dtmFromStartDate.InitialSelection = ((C1.Win.C1Input.InitialSelectionEnum)(resources.GetObject("dtmFromStartDate.InitialSelection")));
			this.dtmFromStartDate.Location = ((System.Drawing.Point)(resources.GetObject("dtmFromStartDate.Location")));
			this.dtmFromStartDate.MaskInfo.AutoTabWhenFilled = ((bool)(resources.GetObject("dtmFromStartDate.MaskInfo.AutoTabWhenFilled")));
			this.dtmFromStartDate.MaskInfo.CaseSensitive = ((bool)(resources.GetObject("dtmFromStartDate.MaskInfo.CaseSensitive")));
			this.dtmFromStartDate.MaskInfo.CopyWithLiterals = ((bool)(resources.GetObject("dtmFromStartDate.MaskInfo.CopyWithLiterals")));
			this.dtmFromStartDate.MaskInfo.EditMask = resources.GetString("dtmFromStartDate.MaskInfo.EditMask");
			this.dtmFromStartDate.MaskInfo.EmptyAsNull = ((bool)(resources.GetObject("dtmFromStartDate.MaskInfo.EmptyAsNull")));
			this.dtmFromStartDate.MaskInfo.ErrorMessage = resources.GetString("dtmFromStartDate.MaskInfo.ErrorMessage");
			this.dtmFromStartDate.MaskInfo.Inherit = ((C1.Win.C1Input.MaskInfoInheritFlags)(resources.GetObject("dtmFromStartDate.MaskInfo.Inherit")));
			this.dtmFromStartDate.MaskInfo.PromptChar = ((char)(resources.GetObject("dtmFromStartDate.MaskInfo.PromptChar")));
			this.dtmFromStartDate.MaskInfo.ShowLiterals = ((C1.Win.C1Input.ShowLiteralsEnum)(resources.GetObject("dtmFromStartDate.MaskInfo.ShowLiterals")));
			this.dtmFromStartDate.MaskInfo.StoredEmptyChar = ((char)(resources.GetObject("dtmFromStartDate.MaskInfo.StoredEmptyChar")));
			this.dtmFromStartDate.MaxLength = ((int)(resources.GetObject("dtmFromStartDate.MaxLength")));
			this.dtmFromStartDate.Name = "dtmFromStartDate";
			this.dtmFromStartDate.NullText = resources.GetString("dtmFromStartDate.NullText");
			this.dtmFromStartDate.ParseInfo.CaseSensitive = ((bool)(resources.GetObject("dtmFromStartDate.ParseInfo.CaseSensitive")));
			this.dtmFromStartDate.ParseInfo.CustomFormat = resources.GetString("dtmFromStartDate.ParseInfo.CustomFormat");
			this.dtmFromStartDate.ParseInfo.DateTimeStyle = ((C1.Win.C1Input.DateTimeStyleFlags)(resources.GetObject("dtmFromStartDate.ParseInfo.DateTimeStyle")));
			this.dtmFromStartDate.ParseInfo.EmptyAsNull = ((bool)(resources.GetObject("dtmFromStartDate.ParseInfo.EmptyAsNull")));
			this.dtmFromStartDate.ParseInfo.ErrorMessage = resources.GetString("dtmFromStartDate.ParseInfo.ErrorMessage");
			this.dtmFromStartDate.ParseInfo.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmFromStartDate.ParseInfo.FormatType")));
			this.dtmFromStartDate.ParseInfo.Inherit = ((C1.Win.C1Input.ParseInfoInheritFlags)(resources.GetObject("dtmFromStartDate.ParseInfo.Inherit")));
			this.dtmFromStartDate.ParseInfo.NullText = resources.GetString("dtmFromStartDate.ParseInfo.NullText");
			this.dtmFromStartDate.ParseInfo.TrimEnd = ((bool)(resources.GetObject("dtmFromStartDate.ParseInfo.TrimEnd")));
			this.dtmFromStartDate.ParseInfo.TrimStart = ((bool)(resources.GetObject("dtmFromStartDate.ParseInfo.TrimStart")));
			this.dtmFromStartDate.PasswordChar = ((char)(resources.GetObject("dtmFromStartDate.PasswordChar")));
			this.dtmFromStartDate.PostValidation.CaseSensitive = ((bool)(resources.GetObject("dtmFromStartDate.PostValidation.CaseSensitive")));
			this.dtmFromStartDate.PostValidation.ErrorMessage = resources.GetString("dtmFromStartDate.PostValidation.ErrorMessage");
			this.dtmFromStartDate.PostValidation.Inherit = ((C1.Win.C1Input.PostValidationInheritFlags)(resources.GetObject("dtmFromStartDate.PostValidation.Inherit")));
			this.dtmFromStartDate.PostValidation.Validation = ((C1.Win.C1Input.PostValidationTypeEnum)(resources.GetObject("dtmFromStartDate.PostValidation.Validation")));
			this.dtmFromStartDate.PostValidation.Values = ((System.Array)(resources.GetObject("dtmFromStartDate.PostValidation.Values")));
			this.dtmFromStartDate.PostValidation.ValuesExcluded = ((System.Array)(resources.GetObject("dtmFromStartDate.PostValidation.ValuesExcluded")));
			this.dtmFromStartDate.PreValidation.CaseSensitive = ((bool)(resources.GetObject("dtmFromStartDate.PreValidation.CaseSensitive")));
			this.dtmFromStartDate.PreValidation.ErrorMessage = resources.GetString("dtmFromStartDate.PreValidation.ErrorMessage");
			this.dtmFromStartDate.PreValidation.Inherit = ((C1.Win.C1Input.PreValidationInheritFlags)(resources.GetObject("dtmFromStartDate.PreValidation.Inherit")));
			this.dtmFromStartDate.PreValidation.ItemSeparator = resources.GetString("dtmFromStartDate.PreValidation.ItemSeparator");
			this.dtmFromStartDate.PreValidation.PatternString = resources.GetString("dtmFromStartDate.PreValidation.PatternString");
			this.dtmFromStartDate.PreValidation.RegexOptions = ((C1.Win.C1Input.RegexOptionFlags)(resources.GetObject("dtmFromStartDate.PreValidation.RegexOptions")));
			this.dtmFromStartDate.PreValidation.TrimEnd = ((bool)(resources.GetObject("dtmFromStartDate.PreValidation.TrimEnd")));
			this.dtmFromStartDate.PreValidation.TrimStart = ((bool)(resources.GetObject("dtmFromStartDate.PreValidation.TrimStart")));
			this.dtmFromStartDate.PreValidation.Validation = ((C1.Win.C1Input.PreValidationTypeEnum)(resources.GetObject("dtmFromStartDate.PreValidation.Validation")));
			this.dtmFromStartDate.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dtmFromStartDate.RightToLeft")));
			this.dtmFromStartDate.ShowFocusRectangle = ((bool)(resources.GetObject("dtmFromStartDate.ShowFocusRectangle")));
			this.dtmFromStartDate.Size = ((System.Drawing.Size)(resources.GetObject("dtmFromStartDate.Size")));
			this.dtmFromStartDate.TabIndex = ((int)(resources.GetObject("dtmFromStartDate.TabIndex")));
			this.dtmFromStartDate.Tag = ((object)(resources.GetObject("dtmFromStartDate.Tag")));
			this.dtmFromStartDate.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("dtmFromStartDate.TextAlign")));
			this.dtmFromStartDate.TrimEnd = ((bool)(resources.GetObject("dtmFromStartDate.TrimEnd")));
			this.dtmFromStartDate.TrimStart = ((bool)(resources.GetObject("dtmFromStartDate.TrimStart")));
			this.dtmFromStartDate.UserCultureOverride = ((bool)(resources.GetObject("dtmFromStartDate.UserCultureOverride")));
			this.dtmFromStartDate.Value = ((object)(resources.GetObject("dtmFromStartDate.Value")));
			this.dtmFromStartDate.VerticalAlign = ((C1.Win.C1Input.VerticalAlignEnum)(resources.GetObject("dtmFromStartDate.VerticalAlign")));
			this.dtmFromStartDate.Visible = ((bool)(resources.GetObject("dtmFromStartDate.Visible")));
			this.dtmFromStartDate.VisibleButtons = ((C1.Win.C1Input.DropDownControlButtonFlags)(resources.GetObject("dtmFromStartDate.VisibleButtons")));
			this.dtmFromStartDate.WrapDateTimeFields = false;
			// 
			// lblToStartDate
			// 
			this.lblToStartDate.AccessibleDescription = resources.GetString("lblToStartDate.AccessibleDescription");
			this.lblToStartDate.AccessibleName = resources.GetString("lblToStartDate.AccessibleName");
			this.lblToStartDate.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblToStartDate.Anchor")));
			this.lblToStartDate.AutoSize = ((bool)(resources.GetObject("lblToStartDate.AutoSize")));
			this.lblToStartDate.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblToStartDate.Dock")));
			this.lblToStartDate.Enabled = ((bool)(resources.GetObject("lblToStartDate.Enabled")));
			this.lblToStartDate.Font = ((System.Drawing.Font)(resources.GetObject("lblToStartDate.Font")));
			this.lblToStartDate.Image = ((System.Drawing.Image)(resources.GetObject("lblToStartDate.Image")));
			this.lblToStartDate.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblToStartDate.ImageAlign")));
			this.lblToStartDate.ImageIndex = ((int)(resources.GetObject("lblToStartDate.ImageIndex")));
			this.lblToStartDate.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblToStartDate.ImeMode")));
			this.lblToStartDate.Location = ((System.Drawing.Point)(resources.GetObject("lblToStartDate.Location")));
			this.lblToStartDate.Name = "lblToStartDate";
			this.lblToStartDate.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblToStartDate.RightToLeft")));
			this.lblToStartDate.Size = ((System.Drawing.Size)(resources.GetObject("lblToStartDate.Size")));
			this.lblToStartDate.TabIndex = ((int)(resources.GetObject("lblToStartDate.TabIndex")));
			this.lblToStartDate.Text = resources.GetString("lblToStartDate.Text");
			this.lblToStartDate.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblToStartDate.TextAlign")));
			this.lblToStartDate.Visible = ((bool)(resources.GetObject("lblToStartDate.Visible")));
			// 
			// btnSearch
			// 
			this.btnSearch.AccessibleDescription = resources.GetString("btnSearch.AccessibleDescription");
			this.btnSearch.AccessibleName = resources.GetString("btnSearch.AccessibleName");
			this.btnSearch.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnSearch.Anchor")));
			this.btnSearch.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSearch.BackgroundImage")));
			this.btnSearch.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnSearch.Dock")));
			this.btnSearch.Enabled = ((bool)(resources.GetObject("btnSearch.Enabled")));
			this.btnSearch.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnSearch.FlatStyle")));
			this.btnSearch.Font = ((System.Drawing.Font)(resources.GetObject("btnSearch.Font")));
			this.btnSearch.Image = ((System.Drawing.Image)(resources.GetObject("btnSearch.Image")));
			this.btnSearch.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSearch.ImageAlign")));
			this.btnSearch.ImageIndex = ((int)(resources.GetObject("btnSearch.ImageIndex")));
			this.btnSearch.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnSearch.ImeMode")));
			this.btnSearch.Location = ((System.Drawing.Point)(resources.GetObject("btnSearch.Location")));
			this.btnSearch.Name = "btnSearch";
			this.btnSearch.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnSearch.RightToLeft")));
			this.btnSearch.Size = ((System.Drawing.Size)(resources.GetObject("btnSearch.Size")));
			this.btnSearch.TabIndex = ((int)(resources.GetObject("btnSearch.TabIndex")));
			this.btnSearch.Text = resources.GetString("btnSearch.Text");
			this.btnSearch.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSearch.TextAlign")));
			this.btnSearch.Visible = ((bool)(resources.GetObject("btnSearch.Visible")));
			this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
			// 
			// lblCCN
			// 
			this.lblCCN.AccessibleDescription = resources.GetString("lblCCN.AccessibleDescription");
			this.lblCCN.AccessibleName = resources.GetString("lblCCN.AccessibleName");
			this.lblCCN.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblCCN.Anchor")));
			this.lblCCN.AutoSize = ((bool)(resources.GetObject("lblCCN.AutoSize")));
			this.lblCCN.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblCCN.Dock")));
			this.lblCCN.Enabled = ((bool)(resources.GetObject("lblCCN.Enabled")));
			this.lblCCN.Font = ((System.Drawing.Font)(resources.GetObject("lblCCN.Font")));
			this.lblCCN.ForeColor = System.Drawing.Color.Maroon;
			this.lblCCN.Image = ((System.Drawing.Image)(resources.GetObject("lblCCN.Image")));
			this.lblCCN.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblCCN.ImageAlign")));
			this.lblCCN.ImageIndex = ((int)(resources.GetObject("lblCCN.ImageIndex")));
			this.lblCCN.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblCCN.ImeMode")));
			this.lblCCN.Location = ((System.Drawing.Point)(resources.GetObject("lblCCN.Location")));
			this.lblCCN.Name = "lblCCN";
			this.lblCCN.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblCCN.RightToLeft")));
			this.lblCCN.Size = ((System.Drawing.Size)(resources.GetObject("lblCCN.Size")));
			this.lblCCN.TabIndex = ((int)(resources.GetObject("lblCCN.TabIndex")));
			this.lblCCN.Text = resources.GetString("lblCCN.Text");
			this.lblCCN.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblCCN.TextAlign")));
			this.lblCCN.Visible = ((bool)(resources.GetObject("lblCCN.Visible")));
			// 
			// btnSearchBeginWO
			// 
			this.btnSearchBeginWO.AccessibleDescription = resources.GetString("btnSearchBeginWO.AccessibleDescription");
			this.btnSearchBeginWO.AccessibleName = resources.GetString("btnSearchBeginWO.AccessibleName");
			this.btnSearchBeginWO.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnSearchBeginWO.Anchor")));
			this.btnSearchBeginWO.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSearchBeginWO.BackgroundImage")));
			this.btnSearchBeginWO.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnSearchBeginWO.Dock")));
			this.btnSearchBeginWO.Enabled = ((bool)(resources.GetObject("btnSearchBeginWO.Enabled")));
			this.btnSearchBeginWO.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnSearchBeginWO.FlatStyle")));
			this.btnSearchBeginWO.Font = ((System.Drawing.Font)(resources.GetObject("btnSearchBeginWO.Font")));
			this.btnSearchBeginWO.Image = ((System.Drawing.Image)(resources.GetObject("btnSearchBeginWO.Image")));
			this.btnSearchBeginWO.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSearchBeginWO.ImageAlign")));
			this.btnSearchBeginWO.ImageIndex = ((int)(resources.GetObject("btnSearchBeginWO.ImageIndex")));
			this.btnSearchBeginWO.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnSearchBeginWO.ImeMode")));
			this.btnSearchBeginWO.Location = ((System.Drawing.Point)(resources.GetObject("btnSearchBeginWO.Location")));
			this.btnSearchBeginWO.Name = "btnSearchBeginWO";
			this.btnSearchBeginWO.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnSearchBeginWO.RightToLeft")));
			this.btnSearchBeginWO.Size = ((System.Drawing.Size)(resources.GetObject("btnSearchBeginWO.Size")));
			this.btnSearchBeginWO.TabIndex = ((int)(resources.GetObject("btnSearchBeginWO.TabIndex")));
			this.btnSearchBeginWO.Text = resources.GetString("btnSearchBeginWO.Text");
			this.btnSearchBeginWO.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSearchBeginWO.TextAlign")));
			this.btnSearchBeginWO.Visible = ((bool)(resources.GetObject("btnSearchBeginWO.Visible")));
			this.btnSearchBeginWO.Click += new System.EventHandler(this.btnSearchBeginWO_Click);
			// 
			// txtBeginWO
			// 
			this.txtBeginWO.AccessibleDescription = resources.GetString("txtBeginWO.AccessibleDescription");
			this.txtBeginWO.AccessibleName = resources.GetString("txtBeginWO.AccessibleName");
			this.txtBeginWO.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtBeginWO.Anchor")));
			this.txtBeginWO.AutoSize = ((bool)(resources.GetObject("txtBeginWO.AutoSize")));
			this.txtBeginWO.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtBeginWO.BackgroundImage")));
			this.txtBeginWO.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtBeginWO.Dock")));
			this.txtBeginWO.Enabled = ((bool)(resources.GetObject("txtBeginWO.Enabled")));
			this.txtBeginWO.Font = ((System.Drawing.Font)(resources.GetObject("txtBeginWO.Font")));
			this.txtBeginWO.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtBeginWO.ImeMode")));
			this.txtBeginWO.Location = ((System.Drawing.Point)(resources.GetObject("txtBeginWO.Location")));
			this.txtBeginWO.MaxLength = ((int)(resources.GetObject("txtBeginWO.MaxLength")));
			this.txtBeginWO.Multiline = ((bool)(resources.GetObject("txtBeginWO.Multiline")));
			this.txtBeginWO.Name = "txtBeginWO";
			this.txtBeginWO.PasswordChar = ((char)(resources.GetObject("txtBeginWO.PasswordChar")));
			this.txtBeginWO.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtBeginWO.RightToLeft")));
			this.txtBeginWO.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtBeginWO.ScrollBars")));
			this.txtBeginWO.Size = ((System.Drawing.Size)(resources.GetObject("txtBeginWO.Size")));
			this.txtBeginWO.TabIndex = ((int)(resources.GetObject("txtBeginWO.TabIndex")));
			this.txtBeginWO.Text = resources.GetString("txtBeginWO.Text");
			this.txtBeginWO.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtBeginWO.TextAlign")));
			this.txtBeginWO.Visible = ((bool)(resources.GetObject("txtBeginWO.Visible")));
			this.txtBeginWO.WordWrap = ((bool)(resources.GetObject("txtBeginWO.WordWrap")));
			this.txtBeginWO.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBeginWO_KeyDown);
			this.txtBeginWO.Leave += new System.EventHandler(this.txtBeginWO_Leave);
			// 
			// lblMasLoc
			// 
			this.lblMasLoc.AccessibleDescription = resources.GetString("lblMasLoc.AccessibleDescription");
			this.lblMasLoc.AccessibleName = resources.GetString("lblMasLoc.AccessibleName");
			this.lblMasLoc.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblMasLoc.Anchor")));
			this.lblMasLoc.AutoSize = ((bool)(resources.GetObject("lblMasLoc.AutoSize")));
			this.lblMasLoc.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblMasLoc.Dock")));
			this.lblMasLoc.Enabled = ((bool)(resources.GetObject("lblMasLoc.Enabled")));
			this.lblMasLoc.Font = ((System.Drawing.Font)(resources.GetObject("lblMasLoc.Font")));
			this.lblMasLoc.ForeColor = System.Drawing.Color.Maroon;
			this.lblMasLoc.Image = ((System.Drawing.Image)(resources.GetObject("lblMasLoc.Image")));
			this.lblMasLoc.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblMasLoc.ImageAlign")));
			this.lblMasLoc.ImageIndex = ((int)(resources.GetObject("lblMasLoc.ImageIndex")));
			this.lblMasLoc.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblMasLoc.ImeMode")));
			this.lblMasLoc.Location = ((System.Drawing.Point)(resources.GetObject("lblMasLoc.Location")));
			this.lblMasLoc.Name = "lblMasLoc";
			this.lblMasLoc.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblMasLoc.RightToLeft")));
			this.lblMasLoc.Size = ((System.Drawing.Size)(resources.GetObject("lblMasLoc.Size")));
			this.lblMasLoc.TabIndex = ((int)(resources.GetObject("lblMasLoc.TabIndex")));
			this.lblMasLoc.Text = resources.GetString("lblMasLoc.Text");
			this.lblMasLoc.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblMasLoc.TextAlign")));
			this.lblMasLoc.Visible = ((bool)(resources.GetObject("lblMasLoc.Visible")));
			this.lblMasLoc.Click += new System.EventHandler(this.lblMasLoc_Click);
			// 
			// lblFromStartDate
			// 
			this.lblFromStartDate.AccessibleDescription = resources.GetString("lblFromStartDate.AccessibleDescription");
			this.lblFromStartDate.AccessibleName = resources.GetString("lblFromStartDate.AccessibleName");
			this.lblFromStartDate.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblFromStartDate.Anchor")));
			this.lblFromStartDate.AutoSize = ((bool)(resources.GetObject("lblFromStartDate.AutoSize")));
			this.lblFromStartDate.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblFromStartDate.Dock")));
			this.lblFromStartDate.Enabled = ((bool)(resources.GetObject("lblFromStartDate.Enabled")));
			this.lblFromStartDate.Font = ((System.Drawing.Font)(resources.GetObject("lblFromStartDate.Font")));
			this.lblFromStartDate.ForeColor = System.Drawing.SystemColors.ControlText;
			this.lblFromStartDate.Image = ((System.Drawing.Image)(resources.GetObject("lblFromStartDate.Image")));
			this.lblFromStartDate.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblFromStartDate.ImageAlign")));
			this.lblFromStartDate.ImageIndex = ((int)(resources.GetObject("lblFromStartDate.ImageIndex")));
			this.lblFromStartDate.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblFromStartDate.ImeMode")));
			this.lblFromStartDate.Location = ((System.Drawing.Point)(resources.GetObject("lblFromStartDate.Location")));
			this.lblFromStartDate.Name = "lblFromStartDate";
			this.lblFromStartDate.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblFromStartDate.RightToLeft")));
			this.lblFromStartDate.Size = ((System.Drawing.Size)(resources.GetObject("lblFromStartDate.Size")));
			this.lblFromStartDate.TabIndex = ((int)(resources.GetObject("lblFromStartDate.TabIndex")));
			this.lblFromStartDate.Text = resources.GetString("lblFromStartDate.Text");
			this.lblFromStartDate.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblFromStartDate.TextAlign")));
			this.lblFromStartDate.Visible = ((bool)(resources.GetObject("lblFromStartDate.Visible")));
			// 
			// lblWO
			// 
			this.lblWO.AccessibleDescription = resources.GetString("lblWO.AccessibleDescription");
			this.lblWO.AccessibleName = resources.GetString("lblWO.AccessibleName");
			this.lblWO.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblWO.Anchor")));
			this.lblWO.AutoSize = ((bool)(resources.GetObject("lblWO.AutoSize")));
			this.lblWO.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblWO.Dock")));
			this.lblWO.Enabled = ((bool)(resources.GetObject("lblWO.Enabled")));
			this.lblWO.Font = ((System.Drawing.Font)(resources.GetObject("lblWO.Font")));
			this.lblWO.Image = ((System.Drawing.Image)(resources.GetObject("lblWO.Image")));
			this.lblWO.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblWO.ImageAlign")));
			this.lblWO.ImageIndex = ((int)(resources.GetObject("lblWO.ImageIndex")));
			this.lblWO.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblWO.ImeMode")));
			this.lblWO.Location = ((System.Drawing.Point)(resources.GetObject("lblWO.Location")));
			this.lblWO.Name = "lblWO";
			this.lblWO.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblWO.RightToLeft")));
			this.lblWO.Size = ((System.Drawing.Size)(resources.GetObject("lblWO.Size")));
			this.lblWO.TabIndex = ((int)(resources.GetObject("lblWO.TabIndex")));
			this.lblWO.Text = resources.GetString("lblWO.Text");
			this.lblWO.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblWO.TextAlign")));
			this.lblWO.Visible = ((bool)(resources.GetObject("lblWO.Visible")));
			// 
			// lblMasLocValue
			// 
			this.lblMasLocValue.AccessibleDescription = resources.GetString("lblMasLocValue.AccessibleDescription");
			this.lblMasLocValue.AccessibleName = resources.GetString("lblMasLocValue.AccessibleName");
			this.lblMasLocValue.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblMasLocValue.Anchor")));
			this.lblMasLocValue.AutoSize = ((bool)(resources.GetObject("lblMasLocValue.AutoSize")));
			this.lblMasLocValue.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			this.lblMasLocValue.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblMasLocValue.Dock")));
			this.lblMasLocValue.Enabled = ((bool)(resources.GetObject("lblMasLocValue.Enabled")));
			this.lblMasLocValue.Font = ((System.Drawing.Font)(resources.GetObject("lblMasLocValue.Font")));
			this.lblMasLocValue.Image = ((System.Drawing.Image)(resources.GetObject("lblMasLocValue.Image")));
			this.lblMasLocValue.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblMasLocValue.ImageAlign")));
			this.lblMasLocValue.ImageIndex = ((int)(resources.GetObject("lblMasLocValue.ImageIndex")));
			this.lblMasLocValue.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblMasLocValue.ImeMode")));
			this.lblMasLocValue.Location = ((System.Drawing.Point)(resources.GetObject("lblMasLocValue.Location")));
			this.lblMasLocValue.Name = "lblMasLocValue";
			this.lblMasLocValue.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblMasLocValue.RightToLeft")));
			this.lblMasLocValue.Size = ((System.Drawing.Size)(resources.GetObject("lblMasLocValue.Size")));
			this.lblMasLocValue.TabIndex = ((int)(resources.GetObject("lblMasLocValue.TabIndex")));
			this.lblMasLocValue.Text = resources.GetString("lblMasLocValue.Text");
			this.lblMasLocValue.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblMasLocValue.TextAlign")));
			this.lblMasLocValue.Visible = ((bool)(resources.GetObject("lblMasLocValue.Visible")));
			// 
			// lblCCNValue
			// 
			this.lblCCNValue.AccessibleDescription = resources.GetString("lblCCNValue.AccessibleDescription");
			this.lblCCNValue.AccessibleName = resources.GetString("lblCCNValue.AccessibleName");
			this.lblCCNValue.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblCCNValue.Anchor")));
			this.lblCCNValue.AutoSize = ((bool)(resources.GetObject("lblCCNValue.AutoSize")));
			this.lblCCNValue.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			this.lblCCNValue.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblCCNValue.Dock")));
			this.lblCCNValue.Enabled = ((bool)(resources.GetObject("lblCCNValue.Enabled")));
			this.lblCCNValue.Font = ((System.Drawing.Font)(resources.GetObject("lblCCNValue.Font")));
			this.lblCCNValue.Image = ((System.Drawing.Image)(resources.GetObject("lblCCNValue.Image")));
			this.lblCCNValue.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblCCNValue.ImageAlign")));
			this.lblCCNValue.ImageIndex = ((int)(resources.GetObject("lblCCNValue.ImageIndex")));
			this.lblCCNValue.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblCCNValue.ImeMode")));
			this.lblCCNValue.Location = ((System.Drawing.Point)(resources.GetObject("lblCCNValue.Location")));
			this.lblCCNValue.Name = "lblCCNValue";
			this.lblCCNValue.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblCCNValue.RightToLeft")));
			this.lblCCNValue.Size = ((System.Drawing.Size)(resources.GetObject("lblCCNValue.Size")));
			this.lblCCNValue.TabIndex = ((int)(resources.GetObject("lblCCNValue.TabIndex")));
			this.lblCCNValue.Text = resources.GetString("lblCCNValue.Text");
			this.lblCCNValue.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblCCNValue.TextAlign")));
			this.lblCCNValue.Visible = ((bool)(resources.GetObject("lblCCNValue.Visible")));
			// 
			// txtFGoodsCode
			// 
			this.txtFGoodsCode.AccessibleDescription = resources.GetString("txtFGoodsCode.AccessibleDescription");
			this.txtFGoodsCode.AccessibleName = resources.GetString("txtFGoodsCode.AccessibleName");
			this.txtFGoodsCode.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtFGoodsCode.Anchor")));
			this.txtFGoodsCode.AutoSize = ((bool)(resources.GetObject("txtFGoodsCode.AutoSize")));
			this.txtFGoodsCode.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtFGoodsCode.BackgroundImage")));
			this.txtFGoodsCode.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtFGoodsCode.Dock")));
			this.txtFGoodsCode.Enabled = ((bool)(resources.GetObject("txtFGoodsCode.Enabled")));
			this.txtFGoodsCode.Font = ((System.Drawing.Font)(resources.GetObject("txtFGoodsCode.Font")));
			this.txtFGoodsCode.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtFGoodsCode.ImeMode")));
			this.txtFGoodsCode.Location = ((System.Drawing.Point)(resources.GetObject("txtFGoodsCode.Location")));
			this.txtFGoodsCode.MaxLength = ((int)(resources.GetObject("txtFGoodsCode.MaxLength")));
			this.txtFGoodsCode.Multiline = ((bool)(resources.GetObject("txtFGoodsCode.Multiline")));
			this.txtFGoodsCode.Name = "txtFGoodsCode";
			this.txtFGoodsCode.PasswordChar = ((char)(resources.GetObject("txtFGoodsCode.PasswordChar")));
			this.txtFGoodsCode.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtFGoodsCode.RightToLeft")));
			this.txtFGoodsCode.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtFGoodsCode.ScrollBars")));
			this.txtFGoodsCode.Size = ((System.Drawing.Size)(resources.GetObject("txtFGoodsCode.Size")));
			this.txtFGoodsCode.TabIndex = ((int)(resources.GetObject("txtFGoodsCode.TabIndex")));
			this.txtFGoodsCode.Text = resources.GetString("txtFGoodsCode.Text");
			this.txtFGoodsCode.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtFGoodsCode.TextAlign")));
			this.txtFGoodsCode.Visible = ((bool)(resources.GetObject("txtFGoodsCode.Visible")));
			this.txtFGoodsCode.WordWrap = ((bool)(resources.GetObject("txtFGoodsCode.WordWrap")));
			this.txtFGoodsCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtFGoodsCode_KeyDown);
			this.txtFGoodsCode.Validating += new System.ComponentModel.CancelEventHandler(this.txtFGoodsCode_Validating);
			// 
			// btnFGoodsCode
			// 
			this.btnFGoodsCode.AccessibleDescription = resources.GetString("btnFGoodsCode.AccessibleDescription");
			this.btnFGoodsCode.AccessibleName = resources.GetString("btnFGoodsCode.AccessibleName");
			this.btnFGoodsCode.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnFGoodsCode.Anchor")));
			this.btnFGoodsCode.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnFGoodsCode.BackgroundImage")));
			this.btnFGoodsCode.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnFGoodsCode.Dock")));
			this.btnFGoodsCode.Enabled = ((bool)(resources.GetObject("btnFGoodsCode.Enabled")));
			this.btnFGoodsCode.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnFGoodsCode.FlatStyle")));
			this.btnFGoodsCode.Font = ((System.Drawing.Font)(resources.GetObject("btnFGoodsCode.Font")));
			this.btnFGoodsCode.Image = ((System.Drawing.Image)(resources.GetObject("btnFGoodsCode.Image")));
			this.btnFGoodsCode.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnFGoodsCode.ImageAlign")));
			this.btnFGoodsCode.ImageIndex = ((int)(resources.GetObject("btnFGoodsCode.ImageIndex")));
			this.btnFGoodsCode.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnFGoodsCode.ImeMode")));
			this.btnFGoodsCode.Location = ((System.Drawing.Point)(resources.GetObject("btnFGoodsCode.Location")));
			this.btnFGoodsCode.Name = "btnFGoodsCode";
			this.btnFGoodsCode.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnFGoodsCode.RightToLeft")));
			this.btnFGoodsCode.Size = ((System.Drawing.Size)(resources.GetObject("btnFGoodsCode.Size")));
			this.btnFGoodsCode.TabIndex = ((int)(resources.GetObject("btnFGoodsCode.TabIndex")));
			this.btnFGoodsCode.Text = resources.GetString("btnFGoodsCode.Text");
			this.btnFGoodsCode.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnFGoodsCode.TextAlign")));
			this.btnFGoodsCode.Visible = ((bool)(resources.GetObject("btnFGoodsCode.Visible")));
			this.btnFGoodsCode.Click += new System.EventHandler(this.btnFGoodsCode_Click);
			// 
			// lblFGoodsCode
			// 
			this.lblFGoodsCode.AccessibleDescription = resources.GetString("lblFGoodsCode.AccessibleDescription");
			this.lblFGoodsCode.AccessibleName = resources.GetString("lblFGoodsCode.AccessibleName");
			this.lblFGoodsCode.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblFGoodsCode.Anchor")));
			this.lblFGoodsCode.AutoSize = ((bool)(resources.GetObject("lblFGoodsCode.AutoSize")));
			this.lblFGoodsCode.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblFGoodsCode.Dock")));
			this.lblFGoodsCode.Enabled = ((bool)(resources.GetObject("lblFGoodsCode.Enabled")));
			this.lblFGoodsCode.Font = ((System.Drawing.Font)(resources.GetObject("lblFGoodsCode.Font")));
			this.lblFGoodsCode.ForeColor = System.Drawing.Color.Maroon;
			this.lblFGoodsCode.Image = ((System.Drawing.Image)(resources.GetObject("lblFGoodsCode.Image")));
			this.lblFGoodsCode.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblFGoodsCode.ImageAlign")));
			this.lblFGoodsCode.ImageIndex = ((int)(resources.GetObject("lblFGoodsCode.ImageIndex")));
			this.lblFGoodsCode.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblFGoodsCode.ImeMode")));
			this.lblFGoodsCode.Location = ((System.Drawing.Point)(resources.GetObject("lblFGoodsCode.Location")));
			this.lblFGoodsCode.Name = "lblFGoodsCode";
			this.lblFGoodsCode.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblFGoodsCode.RightToLeft")));
			this.lblFGoodsCode.Size = ((System.Drawing.Size)(resources.GetObject("lblFGoodsCode.Size")));
			this.lblFGoodsCode.TabIndex = ((int)(resources.GetObject("lblFGoodsCode.TabIndex")));
			this.lblFGoodsCode.Tag = "0";
			this.lblFGoodsCode.Text = resources.GetString("lblFGoodsCode.Text");
			this.lblFGoodsCode.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblFGoodsCode.TextAlign")));
			this.lblFGoodsCode.Visible = ((bool)(resources.GetObject("lblFGoodsCode.Visible")));
			// 
			// lblProductionLine
			// 
			this.lblProductionLine.AccessibleDescription = resources.GetString("lblProductionLine.AccessibleDescription");
			this.lblProductionLine.AccessibleName = resources.GetString("lblProductionLine.AccessibleName");
			this.lblProductionLine.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblProductionLine.Anchor")));
			this.lblProductionLine.AutoSize = ((bool)(resources.GetObject("lblProductionLine.AutoSize")));
			this.lblProductionLine.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblProductionLine.Dock")));
			this.lblProductionLine.Enabled = ((bool)(resources.GetObject("lblProductionLine.Enabled")));
			this.lblProductionLine.Font = ((System.Drawing.Font)(resources.GetObject("lblProductionLine.Font")));
			this.lblProductionLine.Image = ((System.Drawing.Image)(resources.GetObject("lblProductionLine.Image")));
			this.lblProductionLine.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblProductionLine.ImageAlign")));
			this.lblProductionLine.ImageIndex = ((int)(resources.GetObject("lblProductionLine.ImageIndex")));
			this.lblProductionLine.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblProductionLine.ImeMode")));
			this.lblProductionLine.Location = ((System.Drawing.Point)(resources.GetObject("lblProductionLine.Location")));
			this.lblProductionLine.Name = "lblProductionLine";
			this.lblProductionLine.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblProductionLine.RightToLeft")));
			this.lblProductionLine.Size = ((System.Drawing.Size)(resources.GetObject("lblProductionLine.Size")));
			this.lblProductionLine.TabIndex = ((int)(resources.GetObject("lblProductionLine.TabIndex")));
			this.lblProductionLine.Text = resources.GetString("lblProductionLine.Text");
			this.lblProductionLine.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblProductionLine.TextAlign")));
			this.lblProductionLine.Visible = ((bool)(resources.GetObject("lblProductionLine.Visible")));
			// 
			// btnProductionLine
			// 
			this.btnProductionLine.AccessibleDescription = resources.GetString("btnProductionLine.AccessibleDescription");
			this.btnProductionLine.AccessibleName = resources.GetString("btnProductionLine.AccessibleName");
			this.btnProductionLine.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnProductionLine.Anchor")));
			this.btnProductionLine.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnProductionLine.BackgroundImage")));
			this.btnProductionLine.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnProductionLine.Dock")));
			this.btnProductionLine.Enabled = ((bool)(resources.GetObject("btnProductionLine.Enabled")));
			this.btnProductionLine.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnProductionLine.FlatStyle")));
			this.btnProductionLine.Font = ((System.Drawing.Font)(resources.GetObject("btnProductionLine.Font")));
			this.btnProductionLine.Image = ((System.Drawing.Image)(resources.GetObject("btnProductionLine.Image")));
			this.btnProductionLine.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnProductionLine.ImageAlign")));
			this.btnProductionLine.ImageIndex = ((int)(resources.GetObject("btnProductionLine.ImageIndex")));
			this.btnProductionLine.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnProductionLine.ImeMode")));
			this.btnProductionLine.Location = ((System.Drawing.Point)(resources.GetObject("btnProductionLine.Location")));
			this.btnProductionLine.Name = "btnProductionLine";
			this.btnProductionLine.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnProductionLine.RightToLeft")));
			this.btnProductionLine.Size = ((System.Drawing.Size)(resources.GetObject("btnProductionLine.Size")));
			this.btnProductionLine.TabIndex = ((int)(resources.GetObject("btnProductionLine.TabIndex")));
			this.btnProductionLine.Text = resources.GetString("btnProductionLine.Text");
			this.btnProductionLine.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnProductionLine.TextAlign")));
			this.btnProductionLine.Visible = ((bool)(resources.GetObject("btnProductionLine.Visible")));
			this.btnProductionLine.Click += new System.EventHandler(this.btnProductionLine_Click);
			// 
			// txtProductionLine
			// 
			this.txtProductionLine.AccessibleDescription = resources.GetString("txtProductionLine.AccessibleDescription");
			this.txtProductionLine.AccessibleName = resources.GetString("txtProductionLine.AccessibleName");
			this.txtProductionLine.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtProductionLine.Anchor")));
			this.txtProductionLine.AutoSize = ((bool)(resources.GetObject("txtProductionLine.AutoSize")));
			this.txtProductionLine.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtProductionLine.BackgroundImage")));
			this.txtProductionLine.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtProductionLine.Dock")));
			this.txtProductionLine.Enabled = ((bool)(resources.GetObject("txtProductionLine.Enabled")));
			this.txtProductionLine.Font = ((System.Drawing.Font)(resources.GetObject("txtProductionLine.Font")));
			this.txtProductionLine.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtProductionLine.ImeMode")));
			this.txtProductionLine.Location = ((System.Drawing.Point)(resources.GetObject("txtProductionLine.Location")));
			this.txtProductionLine.MaxLength = ((int)(resources.GetObject("txtProductionLine.MaxLength")));
			this.txtProductionLine.Multiline = ((bool)(resources.GetObject("txtProductionLine.Multiline")));
			this.txtProductionLine.Name = "txtProductionLine";
			this.txtProductionLine.PasswordChar = ((char)(resources.GetObject("txtProductionLine.PasswordChar")));
			this.txtProductionLine.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtProductionLine.RightToLeft")));
			this.txtProductionLine.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtProductionLine.ScrollBars")));
			this.txtProductionLine.Size = ((System.Drawing.Size)(resources.GetObject("txtProductionLine.Size")));
			this.txtProductionLine.TabIndex = ((int)(resources.GetObject("txtProductionLine.TabIndex")));
			this.txtProductionLine.Text = resources.GetString("txtProductionLine.Text");
			this.txtProductionLine.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtProductionLine.TextAlign")));
			this.txtProductionLine.Visible = ((bool)(resources.GetObject("txtProductionLine.Visible")));
			this.txtProductionLine.WordWrap = ((bool)(resources.GetObject("txtProductionLine.WordWrap")));
			this.txtProductionLine.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtProductionLine_KeyDown);
			this.txtProductionLine.Validating += new System.ComponentModel.CancelEventHandler(this.txtProductionLine_Validating);
			// 
			// SelectWorkOrders
			// 
			this.AccessibleDescription = resources.GetString("$this.AccessibleDescription");
			this.AccessibleName = resources.GetString("$this.AccessibleName");
			this.AutoScaleBaseSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScaleBaseSize")));
			this.AutoScroll = ((bool)(resources.GetObject("$this.AutoScroll")));
			this.AutoScrollMargin = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMargin")));
			this.AutoScrollMinSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMinSize")));
			this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
			this.CancelButton = this.btnClose;
			this.ClientSize = ((System.Drawing.Size)(resources.GetObject("$this.ClientSize")));
			this.Controls.Add(this.txtFGoodsCode);
			this.Controls.Add(this.txtBeginWO);
			this.Controls.Add(this.dgrdData);
			this.Controls.Add(this.txtProductionLine);
			this.Controls.Add(this.btnFGoodsCode);
			this.Controls.Add(this.lblFGoodsCode);
			this.Controls.Add(this.lblCCNValue);
			this.Controls.Add(this.lblMasLocValue);
			this.Controls.Add(this.dtmToStartDate);
			this.Controls.Add(this.dtmFromStartDate);
			this.Controls.Add(this.lblToStartDate);
			this.Controls.Add(this.btnSearch);
			this.Controls.Add(this.lblCCN);
			this.Controls.Add(this.btnSearchBeginWO);
			this.Controls.Add(this.lblMasLoc);
			this.Controls.Add(this.lblFromStartDate);
			this.Controls.Add(this.lblWO);
			this.Controls.Add(this.btnClose);
			this.Controls.Add(this.btnHelp);
			this.Controls.Add(this.btnSelect);
			this.Controls.Add(this.chkSelectAll);
			this.Controls.Add(this.lblProductionLine);
			this.Controls.Add(this.btnProductionLine);
			this.Enabled = ((bool)(resources.GetObject("$this.Enabled")));
			this.Font = ((System.Drawing.Font)(resources.GetObject("$this.Font")));
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("$this.ImeMode")));
			this.KeyPreview = true;
			this.Location = ((System.Drawing.Point)(resources.GetObject("$this.Location")));
			this.MaximumSize = ((System.Drawing.Size)(resources.GetObject("$this.MaximumSize")));
			this.MinimumSize = ((System.Drawing.Size)(resources.GetObject("$this.MinimumSize")));
			this.Name = "SelectWorkOrders";
			this.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("$this.RightToLeft")));
			this.StartPosition = ((System.Windows.Forms.FormStartPosition)(resources.GetObject("$this.StartPosition")));
			this.Text = resources.GetString("$this.Text");
			this.Load += new System.EventHandler(this.SelectWorkOrders_Load);
			((System.ComponentModel.ISupportInitialize)(this.dgrdData)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.dtmToStartDate)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.dtmFromStartDate)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion

		private void SelectWorkOrders_Load(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".MultiWOIssueMaterial_Load()";
			try 
			{
				//Set form security
				Security objSecurity = new Security();
				this.Name = THIS;
				if (objSecurity.SetRightForUserOnForm(this, SystemProperty.UserName) == 0)
				{
					// You don't have the right to view this item
					PCSMessageBox.Show(ErrorCode.MESSAGE_YOU_HAVE_NO_RIGHT_TO_VIEW, MessageBoxIcon.Warning);
					Close();
					return;
				}

				//check if the Location and the CCN has data
				if (mMasterLocationID <=0 || mCCNID <=0)
				{
					PCSMessageBox.Show(ErrorCode.MSG_WOISSUE_MATERIAL_SELECT_MASLOC_AND_CCN, MessageBoxIcon.Warning);
					Close();
					return;
				}
				//Format DateTime control
				dtmFromStartDate.CustomFormat = Constants.DATETIME_FORMAT_HOUR;
				dtmToStartDate.CustomFormat = Constants.DATETIME_FORMAT_HOUR;
				//store the gridlayout
				dtStoreGridLayout = FormControlComponents.StoreGridLayout(dgrdData);

				//Display the data on form
				lblMasLocValue.Text = mMasterLocCode;
				lblCCNValue.Text = mCCNCode;               
			}

			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR,MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION,MessageBoxIcon.Error);
				}
			}		
		}

		private string AddSearchedRowIntoCurrentDataSet(DataRow drSearchedRow, DataSet dstCurrentData, int mCurrentLine, int pintMasterLocationID)
		{
			DataRow drNewRow = dstCurrentData.Tables[0].NewRow();
			//assign information for this row
			drNewRow[PRO_IssueMaterialDetailTable.LINE_FLD] = mCurrentLine;
			
			//assign information for this row
			drNewRow[SO_SaleOrderDetailTable.FGOODSCODE_FLD] = drSearchedRow[SO_SaleOrderDetailTable.FGOODSCODE_FLD];
			
			//work order master id
			drNewRow[PRO_IssueMaterialDetailTable.WORKORDERMASTERID_FLD] = drSearchedRow[PRO_IssueMaterialDetailTable.WORKORDERMASTERID_FLD];
			drNewRow[PRO_WorkOrderMasterTable.TABLE_NAME + PRO_WorkOrderMasterTable.WORKORDERNO_FLD] = drSearchedRow[PRO_WorkOrderMasterTable.TABLE_NAME + PRO_WorkOrderMasterTable.WORKORDERNO_FLD];

			//work order detail id
			drNewRow[PRO_IssueMaterialDetailTable.WORKORDERDETAILID_FLD] = drSearchedRow[PRO_IssueMaterialDetailTable.WORKORDERDETAILID_FLD];
			drNewRow[PRO_WorkOrderDetailTable.TABLE_NAME + PRO_WorkOrderDetailTable.LINE_FLD] = drSearchedRow[PRO_WorkOrderDetailTable.LINE_FLD];

			//Master location ID
			drNewRow[PRO_IssueMaterialDetailTable.MASTERLOCATIONID_FLD] = pintMasterLocationID;
			
			//Location 
			drNewRow[PRO_IssueMaterialDetailTable.LOCATIONID_FLD] = drSearchedRow[PRO_IssueMaterialDetailTable.LOCATIONID_FLD];
			drNewRow[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD] = drSearchedRow[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD];
			drNewRow[HASBIN] = 1;
			
			//Bin
			drNewRow[PRO_IssueMaterialDetailTable.BINID_FLD] = drSearchedRow[PRO_IssueMaterialDetailTable.BINID_FLD];
			drNewRow[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD] = drSearchedRow[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD];

			//Product
			string strProductID = drSearchedRow[PRO_WorkOrderBomDetailTable.COMPONENTID_FLD].ToString();
			drNewRow[PRO_IssueMaterialDetailTable.PRODUCTID_FLD] = drSearchedRow[PRO_WorkOrderBomDetailTable.COMPONENTID_FLD];
			drNewRow[ITM_ProductTable.TABLE_NAME + ITM_ProductTable.CODE_FLD] = drSearchedRow[ITM_ProductTable.TABLE_NAME + ITM_ProductTable.CODE_FLD];
			drNewRow[ITM_ProductTable.TABLE_NAME + ITM_ProductTable.DESCRIPTION_FLD] = drSearchedRow[ITM_ProductTable.TABLE_NAME + ITM_ProductTable.DESCRIPTION_FLD];
			drNewRow[ITM_ProductTable.TABLE_NAME + ITM_ProductTable.REVISION_FLD] = drSearchedRow[ITM_ProductTable.TABLE_NAME + ITM_ProductTable.REVISION_FLD];

			//HACK: added by Tuan TQ. 23 May, 2006-- add new columns
			drNewRow[ITM_CategoryTable.TABLE_NAME + ITM_CategoryTable.CODE_FLD] = drSearchedRow[ITM_CategoryTable.TABLE_NAME + ITM_CategoryTable.CODE_FLD];
			drNewRow[MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD] = drSearchedRow[MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD];
			drNewRow[MST_PartyTable.TABLE_NAME + MST_PartyTable.NAME_FLD] = drSearchedRow[MST_PartyTable.TABLE_NAME + MST_PartyTable.NAME_FLD];
			//End hack

			//Stock Unit
			drNewRow[PRO_IssueMaterialDetailTable.STOCKUMID_FLD] = drSearchedRow[ITM_ProductTable.STOCKUMID_FLD];
			drNewRow[MST_UnitOfMeasureTable.TABLE_NAME + MST_UnitOfMeasureTable.CODE_FLD] = drSearchedRow[MST_UnitOfMeasureTable.TABLE_NAME + MST_UnitOfMeasureTable.CODE_FLD];

			//needed quantity
			drNewRow[Constants.NEEDED_QTY_COL] = drSearchedRow[PRO_WorkOrderBomDetailTable.REQUIREDQUANTITY_FLD];
			drNewRow[Constants.RemainNeededQuantity_COL] = drSearchedRow[Constants.RemainNeededQuantity_COL];

			if ((drSearchedRow[PRO_WorkOrderDetailTable.ORDERQUANTITY_FLD] != DBNull.Value) || (Convert.ToDecimal(drSearchedRow[PRO_WorkOrderDetailTable.ORDERQUANTITY_FLD]) != 0))
			{
			    drNewRow[PRO_IssueMaterialDetailTable.BOMQUANTITY_FLD] = Convert.ToDecimal(drSearchedRow[PRO_WorkOrderBomDetailTable.REQUIREDQUANTITY_FLD]) / Convert.ToDecimal(drSearchedRow[PRO_WorkOrderDetailTable.ORDERQUANTITY_FLD]);
			}
			else
			{
			    drNewRow[PRO_IssueMaterialDetailTable.BOMQUANTITY_FLD] = 0;
			}

			//add this row back to the tables
			dstCurrentData.Tables[0].Rows.Add(drNewRow);

			return strProductID;			
		}

		/// <summary>
		/// Display the detail data after searching into the grid
		/// //set layout for the grid
		/// </summary>
		/// <param name="pdtbData"></param>
		private void LoadDataDetail(DataTable pdtbData) 
		{
			//load this data into the grid
			dgrdData.DataSource = pdtbData;

			//Restore the gridLayout
			FormControlComponents.RestoreGridLayout(dgrdData,dtStoreGridLayout);
				
			//HACK: added by Tuan TQ. Lock columns
			for(int i =0; i < dgrdData.Splits[0].DisplayColumns.Count; i++)
			{
				dgrdData.Splits[0].DisplayColumns[i].Locked = true;
			}

			dgrdData.Splits[0].DisplayColumns[SELECTED_COL].Locked = false;

			//End hack
			//set the column to be check box
			//Align center for date
			dgrdData.Splits[0].DisplayColumns[PRO_WorkOrderDetailTable.STARTDATE_FLD].Style.HorizontalAlignment = AlignHorzEnum.Center;
			dgrdData.Splits[0].DisplayColumns[PRO_WorkOrderDetailTable.DUEDATE_FLD].Style.HorizontalAlignment = AlignHorzEnum.Center;


			//align right for Quantity
			dgrdData.Splits[0].DisplayColumns[PRO_WorkOrderDetailTable.ORDERQUANTITY_FLD].Style.HorizontalAlignment = AlignHorzEnum.Far;
			dgrdData.Splits[0].DisplayColumns[PRO_WorkOrderDetailTable.LINE_FLD].Style.HorizontalAlignment = AlignHorzEnum.Far;

			//Align center for the Selected Column
			dgrdData.Splits[0].DisplayColumns[SELECTED_COL].Style.HorizontalAlignment = AlignHorzEnum.Center;

			//Set format for the Quantity
			dgrdData.Columns[PRO_WorkOrderDetailTable.ORDERQUANTITY_FLD].NumberFormat = Constants.DECIMAL_LONG_FORMAT;
			dgrdData.Columns[PRO_WorkOrderDetailTable.STARTDATE_FLD].NumberFormat = Constants.DATETIME_FORMAT_HOUR;
			dgrdData.Columns[PRO_WorkOrderDetailTable.DUEDATE_FLD].NumberFormat = Constants.DATETIME_FORMAT_HOUR;
				
			//set the selected to be the check box
			dgrdData.Columns[SELECTED_COL].ValueItems.Presentation = PresentationEnum.CheckBox;
			dgrdData.Columns[SELECTED_COL].DefaultValue = false.ToString();
		}

		public void btnSearch_Click(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnSearch_Click()";
			try
			{
				if (txtFGoodsCode.Text.Trim().Length == 0)
				{
					PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Warning);
					txtFGoodsCode.Focus();
					return;
				}
				DateTime dtmFromDate = DateTime.MinValue, dtmToDate = DateTime.MinValue;
				if (dtmFromStartDate.Value != DBNull.Value && dtmFromStartDate.Text != String.Empty)
				{
					var dtmDate = (DateTime)dtmFromStartDate.Value;
					dtmFromDate = new DateTime(dtmDate.Year, dtmDate.Month, dtmDate.Day, dtmDate.Hour, dtmDate.Minute, 0);
				}

				if (dtmToStartDate.Value != DBNull.Value && dtmToStartDate.Text != String.Empty)
				{
					var dtmDate = (DateTime)dtmToStartDate.Value;
					dtmToDate = new DateTime(dtmDate.Year, dtmDate.Month, dtmDate.Day, dtmDate.Hour, dtmDate.Minute, 0);
				}
				//Call the method in the BO Class to search for Work Order Line
				var objSelectWorkOrdersBO = new SelectWorkOrdersBO();
				string strViewName = "v_RemainComponentForWOIssueWithParentInfo";
				if (intPurpose == (int)PurposeEnum.Compensation)
				{
				    strViewName = "v_RemainComponentForWOIssueWithParentInfoAll";
				}
				string strCondition = (new UtilsBO()).GetConditionByRecord(SystemProperty.UserName, strViewName);
				
				if (txtFGoodsCode.Text.Trim() != string.Empty)
				{
				    strCondition += " AND " + SO_SaleOrderDetailTable.FGOODSCODE_FLD + " = '" + txtFGoodsCode.Text.Trim() + "'";
				}
				int intProductionLineID = 0;
				if (txtProductionLine.Text.Trim() != string.Empty)
				{
				    intProductionLineID = Convert.ToInt32(txtProductionLine.Tag);
				}
				dtbData = objSelectWorkOrdersBO.SearchWorkOrderToIssueMaterial(strCondition, mMasterLocationID, mToLocationID, intWorkOrderMasterID, dtmFromDate, dtmToDate, intProductionLineID, intPurpose);
				
				LoadDataDetail(dtbData);
				chkSelectAll.Checked = false;
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION,MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR,MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION,MessageBoxIcon.Error);
				}
			}
		}
		
		/// <summary>
		/// Search for specific WORK Order
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void btnSearchBeginWO_Click(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnSearchBeginWO_Click()";
			try 
			{

				//search for master location id
				Hashtable hashCondition = new Hashtable();

				hashCondition.Add(PRO_WorkOrderMasterTable.MASTERLOCATIONID_FLD, mMasterLocationID);
				
				//HACK: added by Tuan TQ. 19 Jan, 2006. Apply To Location for issuing
				hashCondition.Add(MST_LocationTable.LOCATIONID_FLD, mToLocationID);
				if (txtFGoodsCode.Text.Trim().Length > 0)
					hashCondition.Add(PRO_WorkOrderDetailTable.SALEORDERDETAILID_FLD, Convert.ToInt32(txtFGoodsCode.Tag));
				//End Hack

				DataRowView drwResult = FormControlComponents.OpenSearchForm(REMAIN_WO_FOR_ISSUE_VIEW, PRO_WorkOrderMasterTable.WORKORDERNO_FLD,txtBeginWO.Text.Trim(), hashCondition,true);
				if (drwResult != null)
				{
					intWorkOrderMasterID = int.Parse(drwResult[PRO_WorkOrderMasterTable.WORKORDERMASTERID_FLD].ToString());
					txtBeginWO.Text = drwResult[PRO_WorkOrderMasterTable.WORKORDERNO_FLD].ToString();
				}
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode,MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION,MessageBoxIcon.Error);
				}
			}
			catch (Exception ex) 
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR,MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION,MessageBoxIcon.Error);
				}
			}
		}

		private void btnClose_Click(object sender, EventArgs e)
		{
			this.DialogResult = DialogResult.No;
			this.Close();
		}
		
		private void txtBeginWO_KeyDown(object sender, KeyEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtBeginWO_KeyDown";
			try
			{
				if (e.KeyCode == Keys.F4)
				{
					if (btnSearchBeginWO.Enabled)
					{
						btnSearchBeginWO_Click(null,null);
					}
				}
			}			
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}

		}

		private void txtBeginWO_Leave(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtBeginWO_Leave";
			try
			{
				FormControlComponents.OnLeaveControl(sender, e);
				if (!btnSearchBeginWO.Enabled || !txtBeginWO.Modified)
				{
					return;
				}

				txtBeginWO.Text = txtBeginWO.Text.Trim();
				if (txtBeginWO.Text == String.Empty)
				{
					intWorkOrderMasterID = 0;
					return;
				}

				UtilsBO objUtilsBO = new UtilsBO();
				intWorkOrderMasterID = 0;
				//search for master location id
				Hashtable hashCondition = new Hashtable();
				hashCondition.Add(PRO_WorkOrderMasterTable.MASTERLOCATIONID_FLD,mMasterLocationID);

				DataTable dtResult = objUtilsBO.GetRows(REMAIN_WO_FOR_ISSUE_VIEW, PRO_WorkOrderMasterTable.WORKORDERNO_FLD, txtBeginWO.Text, hashCondition);
				if (dtResult.Rows.Count == 0)
				{
					txtBeginWO.Text = String.Empty;
					btnSearchBeginWO_Click(null,null);
				}
				else
				{
					if (dtResult.Rows.Count > 1)
					{
						btnSearchBeginWO_Click(null,null);
					}
					else
					{
						intWorkOrderMasterID = int.Parse(dtResult.Rows[0][PRO_WorkOrderMasterTable.WORKORDERMASTERID_FLD].ToString());
						txtBeginWO.Text = dtResult.Rows[0][PRO_WorkOrderMasterTable.WORKORDERNO_FLD].ToString();
					}
				}

				if (intWorkOrderMasterID <= 0)
				{
					txtBeginWO.Text = String.Empty;
				}

			}			
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode,MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION,MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}
		
		private void btnSelect_Click(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnSelect_Click";			
			const string EMPTY_COL_VALUE = " IS NULL ";
			
			try
			{
				Cursor = Cursors.WaitCursor;

				DataTable dtbChanged = dtbData.GetChanges(DataRowState.Modified);
				if(dtbChanged == null || dtbChanged.Rows.Count == 0)
				{
					PCSMessageBox.Show(ErrorCode.MSG_WOISSUE_MATERIAL_SELECT_ATLEAST_ONE_WOLINE, MessageBoxIcon.Warning);
					Cursor = Cursors.Default;
					return;
				}
				else
				{	
					foreach (DataRow drBOMRow in dtbChanged.Rows)
					{
						if (!Convert.ToBoolean(drBOMRow[SELECTED_COL]))
							continue;
						//For the Work Order Master
						string strWhereExpression = PRO_WorkOrderDetailTable.WORKORDERMASTERID_FLD + "=" + drBOMRow[PRO_WorkOrderDetailTable.WORKORDERMASTERID_FLD].ToString();

						// For the Work Order detail
						strWhereExpression += " AND " + PRO_WorkOrderDetailTable.WORKORDERDETAILID_FLD + "=" + drBOMRow[PRO_WorkOrderDetailTable.WORKORDERDETAILID_FLD].ToString();

						// For the Product ID
						strWhereExpression += " AND " + PRO_IssueMaterialDetailTable.PRODUCTID_FLD + "=" + drBOMRow[PRO_WorkOrderBomDetailTable.COMPONENTID_FLD].ToString();

						// Compare the current selected Master Location

						if (drBOMRow[MST_MasterLocationTable.MASTERLOCATIONID_FLD] != DBNull.Value 
							&& drBOMRow[MST_MasterLocationTable.MASTERLOCATIONID_FLD].ToString().Trim() != String.Empty)
						{
							if (int.Parse(drBOMRow[MST_MasterLocationTable.MASTERLOCATIONID_FLD].ToString()) == mMasterLocationID) 
							{
								//two master locations are the same
								if (drBOMRow[MST_LocationTable.LOCATIONID_FLD] != DBNull.Value && drBOMRow[MST_LocationTable.LOCATIONID_FLD].ToString() != String.Empty)
									strWhereExpression += " AND " + MST_LocationTable.LOCATIONID_FLD + "="  + drBOMRow[MST_LocationTable.LOCATIONID_FLD].ToString();
								else
									strWhereExpression += " AND " + MST_LocationTable.LOCATIONID_FLD + EMPTY_COL_VALUE ;

								//two master locations are the same
								if (drBOMRow[MST_BINTable.BINID_FLD] != DBNull.Value && drBOMRow[MST_BINTable.BINID_FLD].ToString() != String.Empty)
									strWhereExpression += " AND " + MST_BINTable.BINID_FLD + "="  + drBOMRow[MST_BINTable.BINID_FLD].ToString();
								else
									strWhereExpression += " AND " + MST_BINTable.BINID_FLD + EMPTY_COL_VALUE ;
							}
							else
							{
								//two master location are different ==> so we have to update its associated to be Null
								drBOMRow[MST_MasterLocationTable.MASTERLOCATIONID_FLD] = DBNull.Value;
								drBOMRow[MST_LocationTable.LOCATIONID_FLD] = DBNull.Value;
								drBOMRow[MST_BINTable.BINID_FLD] = DBNull.Value;

								strWhereExpression += " AND " + MST_LocationTable.LOCATIONID_FLD + EMPTY_COL_VALUE ;
								strWhereExpression += " AND " + MST_BINTable.BINID_FLD + EMPTY_COL_VALUE ;
							}
						}
						else
						{
							//We don't have Master Location ==> the other information must be null or empty
							strWhereExpression += " AND " + MST_LocationTable.LOCATIONID_FLD + EMPTY_COL_VALUE ;
							strWhereExpression += " AND " + MST_BINTable.BINID_FLD + EMPTY_COL_VALUE ;
						}

						DataRow[] drFoundRows = mReturnResult.Tables[0].Select(strWhereExpression);
						
						//Not exit -- add new row
						if (drFoundRows.Length == 0)
						{
							mCurrentLine++;

							AddSearchedRowIntoCurrentDataSet(drBOMRow, mReturnResult, mCurrentLine, mMasterLocationID);
						}
					}

					CalculateAssociatedQuantity(SystemProperty.CCNID, mMasterLocationID, true, mReturnResult.Tables[0]);

					Cursor = Cursors.Default;
					DialogResult = DialogResult.OK;
					Close();					
				}
			}			
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
			finally
			{
				this.Cursor = Cursors.Default;
			}
		}
		
		private void dgrdData_AfterColUpdate(object sender, ColEventArgs e)
		{
			const string METHOD_NAME = THIS + ".dgrdData_AfterColUpdate()";

			try
			{
				if(e.Column.DataColumn.DataField == SELECTED_COL)
				{
					
					if(dgrdData[dgrdData.Row, SELECTED_COL].Equals(DBNull.Value) || dgrdData[dgrdData.Row, SELECTED_COL].ToString().Trim() == string.Empty)
					{
						chkSelectAll.Checked = false;
						return;
					}

					if(!bool.Parse(dgrdData[dgrdData.Row, SELECTED_COL].ToString()))
					{
						chkSelectAll.Checked = false;
						return;
					}

					bool blnCheckAll = true;
					for(int i = 0; i < dgrdData.RowCount; i++)
					{
						if(dgrdData[i, SELECTED_COL].Equals(DBNull.Value) || dgrdData[i, SELECTED_COL].ToString().Trim() == string.Empty)
						{
							blnCheckAll = false;
							break;
						}

						if(!bool.Parse(dgrdData[i, SELECTED_COL].ToString()))
						{
							blnCheckAll = false;
							break;
						}
					}

					chkSelectAll.Checked = blnCheckAll;
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}

		private void chkSelectAll_Click(object sender, EventArgs e)
		{
			const string METHOD_NAME = THIS + ".chkSelectAll_Click()";

			try
			{
				for (int i  = 0; i < dgrdData.RowCount; i++)
				{
					dgrdData[i, SELECTED_COL] = chkSelectAll.Checked? true.ToString(): false.ToString();
				}
			}		
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
		}

        private void CalculateAssociatedQuantity(int pintCCNID, int pintMasterLocationID, bool blnCalulateCommitQty, DataTable pdtbData)
        {
            if (pdtbData.Rows.Count == 0)
            {
                return;
            }

            MultiWOIssueMaterialBO boMultiWOIssueMaterialBO = new MultiWOIssueMaterialBO();

            var productList = pdtbData.Rows.Cast<DataRow>().Where(drRow => drRow.RowState != DataRowState.Deleted).Select(
                row => Convert.ToInt32(row[ITM_ProductTable.PRODUCTID_FLD])).Distinct().ToList();

            var dtbAvailableQuantity = boMultiWOIssueMaterialBO.GetAvailableQuantity(pintCCNID, pintMasterLocationID, productList);
            var dtbCommitedQuantity = boMultiWOIssueMaterialBO.GetCommitedQuantity(pintMasterLocationID, productList);

            decimal decNeededQty = decimal.Zero;

            foreach (DataRow drRow in pdtbData.Rows.Cast<DataRow>().Where(drRow => drRow.RowState != DataRowState.Deleted))
            {
                //get Product
                int productId;
                try
                {
                    productId = Convert.ToInt32(drRow[ITM_ProductTable.PRODUCTID_FLD]);
                }
                catch (InvalidCastException)
                {
                    continue;
                }

                int binId = 0;
                int locationId = 0;
                if (drRow[MST_BINTable.BINID_FLD] != DBNull.Value && !string.IsNullOrEmpty(drRow[MST_BINTable.BINID_FLD].ToString()))
                {
                    binId = Convert.ToInt32(drRow[MST_BINTable.BINID_FLD]);
                }

                if (drRow[MST_LocationTable.LOCATIONID_FLD] != DBNull.Value && !string.IsNullOrEmpty(drRow[MST_LocationTable.LOCATIONID_FLD].ToString()))
                {
                    locationId = Convert.ToInt32(drRow[MST_LocationTable.LOCATIONID_FLD]);
                }

                var availableQty = dtbAvailableQuantity.Where(b => b.LocationID == locationId && b.BinID == binId && b.ProductID == productId).Sum(b => b.OHQuantity - b.CommitQuantity.GetValueOrDefault(0));
                drRow[Constants.AVAILABLE_QTY_COL] = availableQty.GetValueOrDefault(0);

                int workOrderDetailId = Convert.ToInt32(drRow[PRO_IssueMaterialDetailTable.WORKORDERDETAILID_FLD]);

                var decCommitedQty = dtbCommitedQuantity.Where(c => c.WorkOrderDetailID == workOrderDetailId && c.ProductID == productId).Sum(c => c.CommitQuantity);
                drRow[Constants.COMMITED_QTY_COL] = decCommitedQty;

                if (drRow[Constants.NEEDED_QTY_COL] != DBNull.Value && drRow[Constants.NEEDED_QTY_COL] != null && !string.IsNullOrEmpty(drRow[Constants.NEEDED_QTY_COL].ToString()))
                {
                    if (!decimal.TryParse(drRow[Constants.NEEDED_QTY_COL].ToString(), out decNeededQty))
                    {
                        decNeededQty = 0;
                    }
                }

                //calculate the Commit Quantity for this product
                if (blnCalulateCommitQty)
                {
                    decimal decCommitQty = decNeededQty - decCommitedQty;

                    drRow[PRO_IssueMaterialDetailTable.COMMITQUANTITY_FLD] = decCommitQty < 0 ? 0 : decCommitQty;
                }
            }
        }

		private void lblMasLoc_Click(object sender, System.EventArgs e)
		{
		
		}

		private void btnFGoodsCode_Click(object sender, System.EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnFGoodsCode_Click()";
			try 
			{

				DataRowView drwResult = null;
				drwResult = FormControlComponents.OpenSearchForm(SO_SaleOrderDetailTable.TABLE_NAME, SO_SaleOrderDetailTable.FGOODSCODE_FLD,txtFGoodsCode.Text.Trim(), null,true);
				if (drwResult != null)
				{
					lblFGoodsCode.Tag = int.Parse(drwResult[SO_SaleOrderDetailTable.SALEORDERDETAILID_FLD].ToString());
					txtFGoodsCode.Text = drwResult[SO_SaleOrderDetailTable.FGOODSCODE_FLD].ToString();
				}
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode,MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION,MessageBoxIcon.Error);
				}
			}
			catch (Exception ex) 
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR,MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION,MessageBoxIcon.Error);
				}
			}
		}

		private void txtFGoodsCode_Validating(object sender, System.ComponentModel.CancelEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtFGoodsCode_Validating()";
			try 
			{
				if (txtFGoodsCode.Text.Trim() != string.Empty)
				{
					DataRowView drwResult = null;
					drwResult = FormControlComponents.OpenSearchForm(SO_SaleOrderDetailTable.TABLE_NAME, SO_SaleOrderDetailTable.FGOODSCODE_FLD,txtFGoodsCode.Text.Trim(), null,false);
					if (drwResult != null)
					{
						lblFGoodsCode.Tag = int.Parse(drwResult[SO_SaleOrderDetailTable.SALEORDERDETAILID_FLD].ToString());
						txtFGoodsCode.Text = drwResult[SO_SaleOrderDetailTable.FGOODSCODE_FLD].ToString();
					}
				}
			}
			catch (PCSException ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode,MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION,MessageBoxIcon.Error);
				}
			}
			catch (Exception ex) 
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR,MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION,MessageBoxIcon.Error);
				}
			}
		}

		private void btnProductionLine_Click(object sender, EventArgs e)
		{
			// Code Inserted Automatically

			#region Code Inserted Automatically

			this.Cursor = Cursors.WaitCursor;

			#endregion Code Inserted Automatically

			
			const string METHOD_NAME = THIS + ".btnProductionLine_Click()";
			try
			{
				//Call OpenSearchForm for selecting Production Line
				DataRowView drwResult = FormControlComponents.OpenSearchForm(PRO_ProductionLineTable.TABLE_NAME, PRO_ProductionLineTable.CODE_FLD, txtProductionLine.Text.Trim(), null, true);
				
				//If has Production Line matched searching condition, fill values to form's controls
				if(drwResult != null)
				{
					txtProductionLine.Text = drwResult[PRO_ProductionLineTable.CODE_FLD].ToString();
					txtProductionLine.Tag = Convert.ToInt32(drwResult[PRO_ProductionLineTable.PRODUCTIONLINEID_FLD]);
				}
			}
			catch(PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
				}
			}
			catch(Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
				}
			}

			// Code Inserted Automatically

			#region Code Inserted Automatically

			this.Cursor = Cursors.Default;

			#endregion Code Inserted Automatically

			
		}
		/// <summary>
		/// txtProductionLine_Validating
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Trada</author>
		/// <date>Thursday, January 12 2006</date>
		private void txtProductionLine_Validating(object sender, CancelEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtProductionLine_Validating()";
			try
			{
				if (!txtProductionLine.Modified) return;
				//Call OpenSearchForm for selecting Production Line
				DataRowView drwResult = FormControlComponents.OpenSearchForm(PRO_ProductionLineTable.TABLE_NAME, PRO_ProductionLineTable.CODE_FLD, txtProductionLine.Text.Trim(), null, false);
				
				//If has Production Line matched searching condition, fill values to form's controls
				if(drwResult != null)
				{
					txtProductionLine.Text = drwResult[PRO_ProductionLineTable.CODE_FLD].ToString();
					txtProductionLine.Tag = Convert.ToInt32(drwResult[PRO_ProductionLineTable.PRODUCTIONLINEID_FLD]);
				}
				else
					e.Cancel = true;
			}
			catch (PCSException ex)
			{
				// Displays the error message if throwed from PCSException.
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					// Log error message into log file.
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					// Show message if logger has an error.
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// Displays the error message if throwed from system.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					// Log error message into log file.
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					// Show message if logger has an error.
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}

		private void txtProductionLine_KeyDown(object sender, KeyEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtProductionLine_KeyDown()";
			try
			{
				if (e.KeyCode == Keys.F4)
					btnProductionLine_Click(null, null);
			}
			catch (PCSException ex)
			{
				// Displays the error message if throwed from PCSException.
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					// Log error message into log file.
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					// Show message if logger has an error.
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// Displays the error message if throwed from system.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					// Log error message into log file.
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					// Show message if logger has an error.
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}

		private void txtFGoodsCode_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			const string METHOD_NAME = THIS + ".txtFGoodsCode_KeyDown()";
			try
			{
				if (e.KeyCode == Keys.F4)
					btnFGoodsCode_Click(null, null);
			}
			catch (PCSException ex)
			{
				// Displays the error message if throwed from PCSException.
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					// Log error message into log file.
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					// Show message if logger has an error.
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// Displays the error message if throwed from system.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					// Log error message into log file.
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					// Show message if logger has an error.
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}

	}
}
